locationtech/spatial4j

JtsShapeFactory.makeShapeFromGeometry IllegalStateException on empty Point

abrokenjester opened this issue · 0 comments

When using JtsShapeFactory.makeShapeFromGeometry on a Geometry that represents an empty Point, an IllegalStateException is thrown:

java.lang.IllegalStateException: getX called on empty Point
	at org.locationtech.jts.geom.Point.getX(Point.java:102)
	at org.locationtech.spatial4j.shape.jts.JtsShapeFactory.makeShapeFromGeometry(JtsShapeFactory.java:478)

Perhaps it could properly convert an empty JTS Geometry to a corresponding empty Shape.