Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jts-dev] Visual Center of Polygon

I'm interested in calculating the visual center of a JTS Polygon. If the Polygon is convex, then the getCentroid() method works great. However, if the Polygon is non-convex, getCentroid() can return a Point outside the Polygon. Polygon does have a getInteriorPoint() method, however it doesn't always return what I would consider the visual center.

Is there any capability within JTS to calculate the visual center of a Polygon?

Some Googling suggests that I could triangulate the polygon (which JTS can definitely do) and then somehow use that to calculate the visual center (pole of inaccessibility and skeleton algorithms are terms that pop up).

Thank you for any input you can provide.

Eric Angle

Back to the top