[geos-devel] [GEOS] #840: PointOnSurface strange behavior

GEOS geos-trac at osgeo.org
Mon Feb 11 12:01:10 PST 2019

#840: PointOnSurface strange behavior
 Reporter:  sbe             |       Owner:  geos-devel@…
     Type:  defect          |      Status:  new
 Priority:  minor           |   Milestone:  3.6.4
Component:  Default         |     Version:  3.6.2
 Severity:  Unassigned      |  Resolution:
 Keywords:  pointOnSurface  |

Comment (by mdavis):

 The reason for the discrepancy in computed interior points is due to how
 the Interior Point in Area algorithm works.  It is designed to quickly
 find a point lying in the polygon interior, and is optimized for
 performance, not quality of point location.  The two polygons just happen
 to be different enough that the algorithm chooses a different "band" of
 the polygon to place the interior point.

 If a better quality location is desired, then there are other (less
 performant) algorithms to do this (e.g. computing the
 LargestInscribedCircle AKA Pole of Inaccessibility).  I'm hoping to bring
 this to GEOS soon.  Or perhaps compute both the centroid and interior
 point and pick the best one (= furthest from polygon boundary AND in the

 @mloskot: the InteriorPointArea algorithm is deterministic, so it does
 actually return the same point each time it is called.

 Finally, there's a big performance improvement available for the
 InteriorPointArea algorithm, and that should land soon in GEOS.

Ticket URL: <https://trac.osgeo.org/geos/ticket/840#comment:6>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

More information about the geos-devel mailing list