[gdal-dev] Open Python3 bytes using gdal's Python bindings

2020-12-10 Thread Alex Riggs
Hello all, First for some background. I have a service which receives protobuf messages, each message contains a bytes-encoded netcdf file. Currently, I write the netcdf to a temporary, on-disk file, which I then open with gdal.Open() to do some stuff to. Based on what I could discern, both the Op

Re: [gdal-dev] GDALinfo 3.1.4 gives segmentation fault error

2020-12-10 Thread William Kyngesburye
On macOS that would be otool -L /path/to/gdalinfo - William Kyngesburye Don't Panic > On Dec 10, 2020, at 9:01 AM, Jorge Gustavo Rocha wrote: > > Hi Slav, > > Libraries might be the problem. Can you provide more info, please? > > Tell us which libraries are

Re: [gdal-dev] GDALinfo 3.1.4 gives segmentation fault error

2020-12-10 Thread Jorge Gustavo Rocha
Hi Slav, Libraries might be the problem. Can you provide more info, please? Tell us which libraries are being used by gdalinfo. Something like: ldd `which gdalinfo` Regards, Jorge Às 14:31 de 10/12/20, korol...@msn.com escreveu: > What could be a reason why on MacOS Catalina 10.15.6(19G2021)

[gdal-dev] GDALinfo 3.1.4 gives segmentation fault error

2020-12-10 Thread korolevs
What could be a reason why on MacOS Catalina 10.15.6(19G2021) galindo http://download.osgeo.org/geotiff/samples/other/erdas_spnad83.tif gives error segmentation fault but galindo http://download.osgeo.org/geotiff/samples/usgs/o410

Re: [gdal-dev] promote_to_multi and python API

2020-12-10 Thread Norman Vine via gdal-dev
I usually peruse the ogr2ogr.py source for hints maybe this helps https://github.com/OSGeo/gdal/blob/master/gdal/swig/python/samples/ogr2ogr.py#L1512 > On Dec 10, 2020, at 3:39 AM, Martin Landa wrote: > > Hi, > > is there a way to apply PROMOTE_TO_MULTI in Python API? I am trying to > write a s

Re: [gdal-dev] promote_to_multi and python API

2020-12-10 Thread Even Rouault
Martin, > > napsal: > > not sure if this helps you, but "PROMOTE_TO_MULTI" can be added as > > option with several OGR functions with the Python API (eg. Intersection, > > Update, Identity etc.). > > yes, thanks for pointing this out. But it seems to be not possible for > CopyLayer() which is t

Re: [gdal-dev] promote_to_multi and python API

2020-12-10 Thread jratike80
Hi, You do not need to call ogr2ogr because there is a python library equivalent "gdal.VectorTranslate". You can find a PROMOTE_TO_MULTI example from the autotests https://github.com/OSGeo/gdal/blob/master/autotest/utilities/test_ogr2ogr_lib.py#L539 -Jukka Rahkonen- Martin Landa wrote > Hi, >

Re: [gdal-dev] promote_to_multi and python API

2020-12-10 Thread Martin Landa
Hi, čt 10. 12. 2020 v 9:58 odesílatel Kai Mühlbauer napsal: > not sure if this helps you, but "PROMOTE_TO_MULTI" can be added as > option with several OGR functions with the Python API (eg. Intersection, > Update, Identity etc.). yes, thanks for pointing this out. But it seems to be not possible

Re: [gdal-dev] promote_to_multi and python API

2020-12-10 Thread Kai Mühlbauer
Hi Martin, not sure if this helps you, but "PROMOTE_TO_MULTI" can be added as option with several OGR functions with the Python API (eg. Intersection, Update, Identity etc.). See https://gdal.org/python/osgeo.ogr.Layer-class.html HTH, Kai Am 10.12.20 um 09:39 schrieb Martin Landa: Hi, is

[gdal-dev] promote_to_multi and python API

2020-12-10 Thread Martin Landa
Hi, is there a way to apply PROMOTE_TO_MULTI in Python API? I am trying to write a sample script for students in Python which converts SHP file to PostGIS layers. I am dealing with a well known problem "Geometry type (MultiXXX) does not match column type (XXX)". How to solve it properly in order