[udig-devel] epsg-hsql considered rather strange
Jody Garnett
jgarnett at refractions.net
Sat Dec 1 14:09:01 PST 2007
Thanks Andrea; you can also use a GeoTools.initi( Hints ) method to do
the same thing (which is how we would handle it in an Activator class
for the net.refractions.udig.libs plugin.
No the problems I saw were stranger even than that ...
- as you zoom in the aspect ratio of the data would change
- data in the same CRS would magically stretch to take up more of the
screen; so each data would be stretched differently
Although now that you mention it the bounding box calculations could be
thrown off if they are trying to match aspect ratio and end up reversing
the aspect ratio calculations.
I will try again next week when things are not so crazy.
Jody
> Jody Garnett ha scritto:
>> I backed out the experiment of epsg-hsql on trunk/ (returning to
>> epsg-wkt) the results were amazingly strange to behold, data
>> squashing and stretching onto the screen and so forth. When we do get
>> this one to work we will be able to do a much more useful CRS and
>> Projection chooser.
>>
>> At one point we will need to try again, but not today.
>
> Jody, there is one little secret about that that epsg provider:
> it uses the axis order defined by the authority, which is, in the EPSG
> case, lat/lon.
> The epsg-wkt is instead more in line with gis data, and uses lon/lat.
> That's why you're getting those strange results.
>
> To have epsg-hsql behave like epsg-wkt you have to force it to return
> lon/lat data. Theoretically you can do that by using crs.decode(xxx,
> true), but that would require changing all gt2 datastores doing
> decodes to use it.
> In geoserver we do set a global property on startup that forces the
> epsg-hsql provider to default to lon/lat instead, let me find it...
> here:
>
> System.setProperty("org.geotools.referencing.forceXY", "true");
>
> Set this on startup, before the hsql factory has time to get activated,
> and you should be good. After that, you may want to use epsg-extensions
> too, and maybe subclass it somehow to allow your users to add custom
> projections as well, like we did here:
> https://svn.codehaus.org/geoserver/trunk/geoserver/main/src/main/java/org/vfny/geoserver/crs/
>
>
> Cheers
> Andrea
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
More information about the udig-devel
mailing list