[gdal-dev] Python and OGR: layer's GetGeomType and geometry's GetGeometryType return -2147483645

Even Rouault even.rouault at mines-paris.org
Wed Jun 5 03:18:05 PDT 2013


Le mercredi 05 juin 2013 12:13:41, G. Allegri a écrit :
> It's a long time I do not use the OGR Python APIs, but I remember I could
> test layer's GetGeomType and geometry's GetGeometryType against the
> integere corresponding to the
> OGRwkbGeometryType enumeration [1].
> Using Python-OGR from the latest Osgeo4W (Python 2.7.4 and GDAL 1.9.2) I
> alwasy obtain -2147483645 (the integer type lower boundary), while ogrinfo
> outputs the right type, 3D Polygon.
> 
> Am I doing something wrong?

No, see :

$ python
Python 2.6.6 (r266:84292, Oct 29 2012, 23:09:05) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from osgeo import ogr
>>> ogr.wkbPolygon25D
-2147483645
>>> ogr.wkbPolygon | ogr.wkb25DBit
-2147483645
>>> 


> Giovanni
> 
> [1]
> http://www.gdal.org/ogr/ogr__core_8h.html#a800236a0d460ef66e687b7b65610f12a

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list