[gdal-dev] Python API: Geometry.Buffer with JOIN_STYLE

Martin Landa landa.martin at gmail.com
Fri Oct 4 13:55:21 PDT 2024


Hi all,

in the documentation [1] is mentioned:

"""
Buffer(Geometry self, double distance, char ** options)→ Geometry
"""

where the options argument points to [2]. But

"""
geom.Buffer(6, options=["JOIN_STYLE=MITRE"])
"""

fails with

"""
  File "/usr/lib/python3.11/site-packages/osgeo/ogr.py", line 6350, in
Buffer
    return _ogr.Geometry_Buffer(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'options' is an invalid keyword argument for Geometry_Buffer()
"""

So is there any possibility to use OGR_G_BufferEx's options in the Python
API?

Thanks a lot for your help, Martin

[1] https://gdal.org/en/latest/api/python/vector_api.html#osgeo.ogr.Geometry
[2]
https://gdal.org/en/latest/api/vector_c_api.html#_CPPv414OGR_G_BufferEx12OGRGeometryHd12CSLConstList

-- 
Martin Landa
https://geomatics.fsv.cvut.cz/en/employees/martin-landa/
http://gismentors.cz/mentors/landa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20241004/d41c5070/attachment.htm>


More information about the gdal-dev mailing list