[udig-devel] epsg-hsql considered rather strange
Andrea Aime
aaime at openplans.org
Sat Dec 1 02:18:19 PST 2007
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
More information about the udig-devel
mailing list