I have a point Shapefile with unsorted feature ID's (FID). I want to convert the same point file into polygon Shapefile by using python gdal/ogr. I got the help from link1 and link2. I'm able to make polygon shapefile successfully but because of my unsorted point Shapefile the output of polygon shapefile is irregular (not as expected). Expected polygon shapefile is ring/polygon/box around points .
My idea is to order point coordinates by its longitude and latitude in this way:
- Sort by longitude, in for loop iterate over the coordinates while longitude ascends;
- Then iterate while latitude descends;
Then merge lists with coordinates and create polygon.
Not pretend this is the most elegant solution, maybe you send your data so I will test my idea