Hi,

So you have an uncategorized bunch of points and you wish to have an algorithm 
that recognizes outer and inner rings automatically? I fear that is not as easy 
as it may appear. Have a look at the annexed image with two polygons having the 
same vertices. How could an algorithm know which interpretation is correct? In 
this simple case you could make a convex hull, delete the vertices which were 
consumed for the outer ring, and create a new ring from the remaining points, 
but generally it will not work if there are two holes, for example.

If the points come from a GPX device, make the application to record indexes 
for both the points and the rings “ring1-point1, 
ring1-point2---ring2-point1,ring2-point2” and construct the polygon ring by 
ring.

-Jukka Rahkonen-

Lähettäjä: gdal-dev <gdal-dev-boun...@lists.osgeo.org> Puolesta Paul Meems
Lähetetty: perjantai 3. maaliskuuta 2023 14.52
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] Convex hull with holes

How can I algorithmically create a parcel border that accounts for islands or 
holes within the parcel based on a list of coordinates?

While GDAL+GEOS has a Convex hull method, it only identifies the outer border.

Has GDAL+GEOS a method that I can use to detect inner holes as well, such as in 
a donut-shaped field?

The output can be json or shapefile, that doesn't matter.

Thanks,

Paul Meems
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to