Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JtsShapeFactory.makeShapeFromGeometry IllegalStateException on empty Point #163

Closed
abrokenjester opened this issue Aug 7, 2018 · 0 comments

Comments

@abrokenjester
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants