[gdal-dev] help! convert GML to Shp by using python

Frank Warmerdam warmerdam at pobox.com
Thu Dec 18 15:29:29 EST 2008


Ari Jolma wrote:
> Frank Warmerdam kirjoitti:
>> Xiaoyu Guan wrote:
>>> The GML which i used is located at 
>>> http://www.openlayers.org/dev/examples/gml/multipolygon.xml
>>> but the polygon.shp file does not contain the first feature's and the 
>>> third feature's attribute
>>
>>
>> and this seemed to produce a shapefile with all three features, and all
>> their attributes (ogc_fid, name, id).  I did this with GDAL/OGR trunk -
>> essentially identical to 1.6.0.
> 
> I'm observing a similar thing as Xiaoyu reports. This is with 1.6.0 or 
> very near to it (revision 15975). Here's the output from ogrinfo:
> 
> c:\>ogrinfo  multipolygon.xml
> Had to open data source read-only.
> INFO: Open of `multipolygon.xml'
>      using driver `GML' successful.
> 1: multipolygon
> 2: ogc_fid
> 3: name
> 4: id
...
> note the attributes are null. I'll look more into the issue.

Ari,

Interesting. On my 64bit ubuntu system I can access this file without
problems back as far as 1.5 branch.  I'd suggest filing a ticket once
you narrow things down.  Items to keep an eye on include the Xerces
version.  I appear to be building against Xerces 2.7.0.

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