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

Barry DeZonia bdezonia at gmail.com
Fri Oct 4 14:06:34 PDT 2024


I don't know a lot about gdal but what if your call was just:

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

On Fri, Oct 4, 2024 at 3:55 PM Martin Landa via gdal-dev <
gdal-dev at lists.osgeo.org> wrote:

> 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
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20241004/3b2ab058/attachment.htm>


More information about the gdal-dev mailing list