[gdal-dev] Python problem with exportToGML()

Frank Warmerdam warmerdam at pobox.com
Tue Feb 16 23:16:40 EST 2010


Eric Wolf wrote:
> I've decided to just get some work done rather than focus on the Oracle 
> issues. Fortunately, the code I write with OGR using Shapefiles should 
> work seamlessly with Oracle (or relatively seamlessly).
> 
> But now I have a new problem. I am getting the following error when I 
> call exportToGML():
> 
> Traceback (most recent call last):
>   File "shp2n3.py", line 178, in <module>
>     write_triples()
>   File "shp2n3.py", line 137, in write_triples
>     gml = geom.exportToGML()
>   File "C:\Python26\lib\site-packages\osgeo\ogr.py", line 2672, in <lambda>
>     __getattr__ = lambda self, name: _swig_getattr(self, Geometry, name)
>   File "C:\Python26\lib\site-packages\osgeo\ogr.py", line 34, in 
> _swig_getattr
>     raise AttributeError,name
> AttributeError: exportToGML

Eric,

Try ExportToGML() instead of exportToGML().  The swig bindings do not
follow the case capitalization as some of the OGR methods.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list