[gdal-dev] Alpine Linux GDAL Issues
Chander Ganesan
chander.ganesan at gmail.com
Fri Jul 23 05:15:07 PDT 2021
Hello,
I've been having some weird issues with GDAL and Alpine linux recently, and
hope ya'll can help me resolve it.
The example below illustrates the issue in a reproducible manner -
basically, a simple call to Transform results in a wierd error coming back
from SWIG/OGR.
As a side (but perhaps unrelated note) I also find some weird issues with
OGR (python) reading shapefiles - it sometimes gets the wrong projection
info (even though OGRinfo returns the correct data):
$ docker pull alpine:3.14
$ docker run -it alpine:3.14 ash
/ # apk update; apk add py3-gdal python3
/ #
*python3 -c "from osgeo import ogr, osr; epsg4326=osr.SpatialReference();
epsg3857=osr.SpatialReference(); epsg4326.ImportFromEPSG(4326);
epsg3857.ImportFromEPSG(3857);
c=ogr.CreateGeometryFromWkt('POLYGON((-161.9696 10.6918,-161.9696
60.6943,145.719 60.6943,145.719 10.6918,-161.9696 10.6918))');
c.Transform(epsg4326,epsg3857)"*
*g3857.ImportFromEPSG(3857);
c=ogr.CreateGeometryFromWkt('POLYGON((-161.9696 10.6918,-161.9696
60.6943,145.719 60.6943,145.719 10.6918,-161.9696 *
*10.6918))'); c.Transform(epsg4326,epsg3857)"*
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.9/site-packages/osgeo/ogr.py", line 7796, in
Transform
return _ogr.Geometry_Transform(self, *args)
NotImplementedError: Wrong number or type of arguments for overloaded
function 'Geometry_Transform'.
Possible C/C++ prototypes are:
OGRGeometryShadow::Transform(OSRCoordinateTransformationShadow *)
Thanks!
Chander
OGRGeometryShadow::Transform(OGRGeomTransformerShadow *)
/ #
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210723/885f445d/attachment.html>
More information about the gdal-dev
mailing list