andrea antonello ha scritto:
Hi Andrea,
[...]
Out of curiosity, did you make your wkt factory overriding or
appending? It's just a matter of priority, if the priority is
set higher than the HSQL one people will be able to override the
official EPSG codes, which comes in handy when the GeoTools
referencing modules picks up the wrong TOWGS84 set, in projections
that have multiple ones (Italy has three for example).
This one is the overriding sample:
https://svn.codehaus.org/geoserver/trunk/src/main/src/main/java/org/vfny/geoserver/crs/GeoserverOverridingWKTFactory.java
Thanks for the link.
I have a question though. How would overriding be? In the example you
cite for Italy we have an epsg 3004 which is not accurate and then we
have 3 sets of towgs84 for different parts of Italy. In JGrass
currently I appended them to the epsg as 3 new crs with names
30041000, 30041001, 30041002, since I couldn't come up with something
better. So am I getting it right that there is no way to override one
code with multiple?
Correct, one code <=> one set of TOWGS84 params.
Martin once said he wanted to keep the full set of params along with
their areas of validity and apply a different set depending on where
the coordinate to be transformed landed, but afaik he never got
around to implement this (to be fair, not sure EPSG actually
stores a geometry that you can use as the area of validity, so
far I've just seen names).
So your approach works and it's the only one that I know to be
working if you need to keep all the three transformation sets
around
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel