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

PointLocator.ComputeLocation does not handle empty values #725

Closed
tohidemyname opened this issue Nov 17, 2023 · 1 comment
Closed

PointLocator.ComputeLocation does not handle empty values #725

tohidemyname opened this issue Nov 17, 2023 · 1 comment

Comments

@tohidemyname
Copy link

tohidemyname commented Nov 17, 2023

The JTS bug report is as follows:
locationtech/jts#1015
The patch of the bug is as follows:

 private void computeLocation(Coordinate p, Geometry geom)
   {
+    if (geom.isEmpty())
+      return;
+    
     if (geom instanceof Point) {
       updateLocationInfo(locateOnPoint(p, (Point) geom));
     }

I just checked out the develop branch of nts. Its code is as follows:

private void ComputeLocation(Coordinate p, Geometry geom)
{
    if (geom is Point)
        UpdateLocationInfo(LocateOnPoint(p, (Point) geom));
    if (geom is LineString)

This bug may be not fixed from nts.

@FObermaier
Copy link
Member

Fixed with 53c8cac

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

No branches or pull requests

2 participants