In QGIS, I want smooth a shapefile/vector's vertices.
I can use QGIS/processing_toolbox/smooth.
If I want to programmingly achieve this using osgeo/ogr/gdal, which function should I use?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityYes, it is absolutely possible using GDAL/OGR
through ogr2ogr
by using -simplify
option. You should pass a <tolerance>
value as it is described on their website.
Another way is to use osgeo.ogr.Geometry.Buffer(self, *args, **kwargs)
on which supports arguments to control distance and number of segments.
If your shapes are polylines you can use shapely->parallel_offset
as well. which has a round
option.
Good Luck.