GeoLatte / geolatte-geom

A geometry model that conforms to the OGC Simple Features for SQL specification.
Other
134 stars 63 forks source link

Wrong CRS defintion in spatial_ref_sys.txt #41

Closed stefan0722 closed 8 years ago

stefan0722 commented 8 years ago

If you call crsMap.get(3857) in CrsRegistry you get the CRS 3785 definition which is different. When using with hibernate spatial, the geometry will be persisted in a different SRID which leads to a inconsistent db state.

A workaround is to shadow the spatial_ref_sys.txt and exchange the PROJCS definition with the one from http://spatialreference.org/ref/sr-org/7483/postgis/.

kozyr commented 8 years ago

This makes it impossible to use Hibernate Spatial 5.0+ if you're using 3857 SRID and 3857 Geometry columns in the DB...

maesenka commented 8 years ago

The fix is now released in version 1.0.3

thekalinga commented 8 years ago

Have the following issue with 1.0.3

[2016-07-28 17:38:07.165] log4j2 - 15965  WARN [http-nio-8080-exec-2] --- CrsRegistry: Can't parse srid 3857 ('PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH], AUTHORITY["EPSG","3857"]]'). 
Illegal Character at pos 0 in Wkt text: 'PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH], AUTHORITY["EPSG","3857"]]'