Andrea Aime ha scritto: > Milton Jonathan ha scritto: >> Hello again Andrea >> >> Sorry for not showing up for a while, but other projects here kept me >> busy. A colleague of mine was trying to build the test for fixing the >> issue with the PostgisDataStore, but he ended up with a little problem. >> >> When using epsg-wkt, the call for CRS.lookupIdentifier seems to fail >> (returns null) on a .prj read from a shapefile (which does not have EPSG >> codes in it). I guess that is to be expected and the same call does work >> when linking with epsg-hsql, however the tests within the gt-postgis >> package are all linked up with epsg-wkt for some reason. > > Well, basically because they were written in a time when epsg-wkt > was perceived as the best solution (as it does not flip the axis > in the geographic reference systems). epsg-hsql can be used as well, > we just need to setup an system wide hint forcing the referencing > subsystem to return the common axis order (lon/lat) for the > geographic data. > >> So, the possible pathways I see are: >> - Leave everything as it is, but the test will be a little useless in >> this case. >> - Change to link with epsg-hsql, then the test will work fine (I vote >> for this one, but I don't know if there are any inconvenient consequences) > > Oh, did you already test and everything worked fine? If so I'm very > much +1 on this option. Otherwise it's just a matter of adding > Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, > Boolean.TRUE); > to the setup and make sure it's run as the very first statement > run.
Actually another way to handle this would be to patch the postgis datastore as suggested by Johan here: http://jira.codehaus.org/browse/GEOT-2063 Which is something I'm inclined to do on trunk, not very much on 2.5.x as it might break something else (the whole datastore is assuming to work with a normal cartesian axis order, not sure what could happen once we lift that assumption and try to play with epsg-hsql in its default behaviour). Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
