jts

PostGIS Geometry saving: “Invalid endian flag value encountered.”

和自甴很熟 提交于 2019-11-28 01:58:28
I have a Spring Roo + Hibernate project which takes a JTS well-known text (WKT) String input from the client application, converts it into a JTS Geometry object, and then attempts to write it to the PostGIS database. I had some problems with the JDBC connection and types , but these seem to have been resolved with: @Column(columnDefinition = "Geometry", nullable = true) private Geometry centerPoint; And the conversion does: Geometry geom = new WKTReader(new GeometryFactory(new PrecisionModel(), 4326)).read(source); However now when Hibernate tries to write my Geometry object to the database, I

PostGIS Geometry saving: “Invalid endian flag value encountered.”

為{幸葍}努か 提交于 2019-11-26 22:02:29
问题 I have a Spring Roo + Hibernate project which takes a JTS well-known text (WKT) String input from the client application, converts it into a JTS Geometry object, and then attempts to write it to the PostGIS database. I had some problems with the JDBC connection and types, but these seem to have been resolved with: @Column(columnDefinition = "Geometry", nullable = true) private Geometry centerPoint; And the conversion does: Geometry geom = new WKTReader(new GeometryFactory(new PrecisionModel()