Skip to content

JtsShapeFactory.makeShapeFromGeometry IllegalStateException on empty Point #163

@abrokenjester

Description

@abrokenjester

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions