GeoLatte / geolatte-geom

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

Support for EPSG 4979 #100

Closed GraemeKerry closed 3 years ago

GraemeKerry commented 4 years ago

Hi,

I am using geolatte-geom 1.3.0 as part of a Hibernate Spatial stack to persist JTS geometries to a PostGIS database.

This works fine for 2D geometries using a SRID of 4326. However I am now trying to persist 3D JTS geometries (X, Y and Z) using a SRID of 4979. This SRID is not reaching the database and the WKB that goes across in the SQL doesn't have the SRID in it.

I have debugged the code and think this may be caused by the fact geo latte-geom doesn't include 4979 in it's spatial_ref_sys.txt file that is used during JTS to geo latte geometry conversion (JTS.java). 4979 is looked up, not found and a default of -1 is assigned.

I found the following link which reports a similar issue that was fixed in 1.1.0. https://hibernate.atlassian.net/browse/HHH-11283?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&showAll=true

Am I doing something wrong? Should 4979 work? If not is there another SRID I could correctly apply to model WGS84 geometries with a height?

Thanks

Graeme

maesenka commented 4 years ago

You should use 4326. Because so many data out there uses 2D reference systems with 3D data that geolatte-geom will automatically add a third (vertical) dimension for XYZ data.

Regards,

Karel

On Fri, Apr 3, 2020 at 12:32 PM GraemeKerry notifications@github.com wrote:

Hi,

I am using geolatte-geom 1.3.0 as part of a Hibernate Spatial stack to persist JTS geometries to a PostGIS database.

This works fine for 2D geometries using a SRID of 4326. However I am now trying to persist 3D JTS geometries (X, Y and Z) using a SRID of 4979. This SRID is not reaching the database and the WKB that goes across in the SQL doesn't have the SRID in it.

I have debugged the code and think this may be caused by the fact geo latte-geom doesn't include 4979 in it's spatial_ref_sys.txt file that is used during JTS to geo latte geometry conversion (JTS.java). 4979 is looked up, not found and a default of -1 is assigned.

I found the following link which reports a similar issue that was fixed in 1.1.0.

https://hibernate.atlassian.net/browse/HHH-11283?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&showAll=true

Am I doing something wrong? Should 4979 work? If not is there another SRID I could correctly apply to model WGS84 geometries with a height?

Thanks

Graeme

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GeoLatte/geolatte-geom/issues/100, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADSH6PU6CRDG2HFTV7ENGDRKW3LFANCNFSM4L3ZOTKQ .

GraemeKerry commented 4 years ago

Thanks for the quick reply Karel, I'll give that a try.