When converting a GeoLatte geometry into a JTS geometry via org.geolatte.geom.jts.JTS.to(), a default GeometryFactory is used which causes problems when dealing with JTS functions later.
One example: Even though JTS.to() copies the SRID of the original GeoLatte geometry, the internally used GeometryFactory defaults to a SRID of 0. So the converted JTS geometry is labelled with a correct SRID whereas its underlying GeometryFactory has a wrong SRID. This is inconsistent and misleading because subsequently applied JTS functions like reverse() refer to the geometry's GeometryFactory which, with it's invalid SRID, returns a resulting geometry with invalid SRID as well.
My suggestion: In org.geolatte.geom.jts.JTS we should not use a default internal GeometryFactory but at least allow to specify a custom one explicitly.
When converting a GeoLatte geometry into a JTS geometry via
org.geolatte.geom.jts.JTS.to()
, a defaultGeometryFactory
is used which causes problems when dealing with JTS functions later.One example: Even though
JTS.to()
copies the SRID of the original GeoLatte geometry, the internally usedGeometryFactory
defaults to a SRID of 0. So the converted JTS geometry is labelled with a correct SRID whereas its underlying GeometryFactory has a wrong SRID. This is inconsistent and misleading because subsequently applied JTS functions likereverse()
refer to the geometry'sGeometryFactory
which, with it's invalid SRID, returns a resulting geometry with invalid SRID as well.My suggestion: In
org.geolatte.geom.jts.JTS
we should not use a default internalGeometryFactory
but at least allow to specify a custom one explicitly.