New answers tagged

1

Yes, 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-&...


0

On MacOSX: Conda installation: (Easy mode) From https://anaconda.org/conda-forge/gdal Assuming you have conda installed, conda install -c conda-forge gdal That's it you're done, conda installs the underlying gdal binaries for you. Using brew/pip brew install gdal # This installs the underlying binaries pip install gdal #(inside your venvs or whatever ...


3

Try AddPointM() instead of AddPoint(): AddPointM(Geometry self, double x, double y, double m) https://gdal.org/python/osgeo.ogr.Geometry-class.html#AddPointM


2

You need to add a special SQLStatement keyword in the VectorTranslateOptions: gdoptions=gdal.VectorTranslateOptions(options=['-lco','GEOMETRY=AS_WKT', '-preserve_fid',], format=outDriverName, SQLStatement=f'select {inLayerIDColname} as {...


1

Something like (untested): gdal.VectorTranslate('path/to/output.csv', 'path/to/input.gdb', layers=[input_layer_name], format='CSV', layerCreationOptions=['GEOMETRY=AS_WKT'])


Top 50 recent answers are included