You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The WKBWriter constructor expects output dimension (e.g. new WKBWriter(dimension, ByteOrderValues.LITTLE_ENDIAN, true)) and it has to be either 2 or 3. However, Geometry#getDimension is not appropriate to use here. Is there a generic way to determine the dimension for a given Geometry object? In other words, is there such method that satisfies the following:
#getDimension(GEOMETRY_FACTORY.createPolygon(new Coordinate[]{new Coordinate(1,2,3), new Coordinate(2,2,3), new Coordinate(2,3,3), new Coordinate(1,2,3)})) -> 3
#getDimension(GEOMETRY_FACTORY.createMultiPolygon(new Polygon[]{GEOMETRY_FACTORY.createPolygon(new Coordinate[]{new Coordinate(1,2,3), new Coordinate(2,2,3), new Coordinate(2,3,3), new Coordinate(1,2,3)})})) -> 3
where #getDimension accepts Geometry.
The text was updated successfully, but these errors were encountered:
The
WKBWriter
constructor expects output dimension (e.g.new WKBWriter(dimension, ByteOrderValues.LITTLE_ENDIAN, true)
) and it has to be either 2 or 3. However,Geometry#getDimension
is not appropriate to use here. Is there a generic way to determine the dimension for a givenGeometry
object? In other words, is there such method that satisfies the following:#getDimension(GEOMETRY_FACTORY.createPoint(new Coordinate(1,2)))
->2
#getDimension(GEOMETRY_FACTORY.createPoint(new Coordinate(1,2,3)))
->3
#getDimension(GEOMETRY_FACTORY.createPolygon(new Coordinate[]{new Coordinate(1,2,3), new Coordinate(2,2,3), new Coordinate(2,3,3), new Coordinate(1,2,3)}))
->3
#getDimension(GEOMETRY_FACTORY.createMultiPolygon(new Polygon[]{GEOMETRY_FACTORY.createPolygon(new Coordinate[]{new Coordinate(1,2,3), new Coordinate(2,2,3), new Coordinate(2,3,3), new Coordinate(1,2,3)})}))
->3
where
#getDimension
acceptsGeometry
.The text was updated successfully, but these errors were encountered: