JTS - Test if a Geometry is convex

المشرف العام

Administrator
طاقم الإدارة
I'm using the Java Topology Suite and I'd like to efficiently check if a Geometry (a Polygon in fact) is convex or not.

I currently do if (geometry.convexHull().equals(geometry)) but obivously that is ... suboptimal :)

I could implement it myself with the early-interruption condition on the gift-wrapping algorithm, but I can't imagine that this isn't implemented in JTS already.



أكثر...
 
أعلى