Reputation: 18028
I have a shapefile with around 19,000 points. Its basically export from a raster. Now i need to extract polygons, by aggregating the points which have same value.The field who's value i am going to use for aggregation is dynamically calculated each time using the elevation of points. NOw i need to spit out polygons. How can I do that using GDAL? is there a utility to do it. Any other opensource solutions are welcome. I have ArcGIS which has a toolbox called 'Aggregate Points' but somehow licence for it is missing.
Upvotes: 1
Views: 1371
Reputation: 38942
Here are some possibilities:
You can write a program using GDAL (actually OGR) in C++ or Python (or any other language for which GDAL/OGR provides bindings) and construct Polygon objects from the selection (sub-sets) of your points. Then you can serialise those polygons in to Shapefile or anyother storage supported by OGR.
Alternatively, forget about GDAL/OGR and load your data into PostgreSQL database enabled with PostGIS. Then use PostGIS functionality to construct Polygons
There is example of polygon construction from points based on bruteforce string manipulation and use of geometry constructor posted as postgis-users thread Making a Polygon from Points
Upvotes: 2