java - How to enumerate vertices in Geometry in JTS? -
java topology suite has geometry
class, has getnumpoints()
method. according documentation, counts vertices in constituent geometries.
how enumerate these points? can obtained getcoordinates()
method, looks not optimal, since (1) not iterative , (2) requires convert each coordinate tuple point
geomertfactory
.
as have proper geometry type linestring or polygon, use (cast geometry it), can use getpointn(index)
.
coordinates not points way. coordinate not geometry in jts, class hold numeric values. points actual geometries.
Comments
Post a Comment