Opened 10 years ago

Closed 8 years ago

#5185 closed defect (invalid)

GML to Shapefile: Corrupt Attribute Table

Reported by: krw1010 Owned by: warmerdam
Priority: normal Milestone: 1.10.1
Component: OGR_SRS Version: 1.10.0
Severity: normal Keywords: ogr2ogr shapefile

Description (last modified by krw1010)

After Ogr2Ogr.exe (gdal 1.10) is used to convert a GML file to a Shapefile the attribute table is not readable by ArcMap. Receive the error "A column was specified that does not exist". Is there any insight in to how the attribute table is constructed with Ogr2Ogr?

Attachments (1)

lakes.gml (483.8 KB ) - added by krw1010 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by krw1010, 10 years ago

Description: modified (diff)

comment:2 by Even Rouault, 10 years ago

Could you attach the GML file you've converted and the ogr2ogr command line that you have used to convert it to a shapefile ?

by krw1010, 10 years ago

Attachment: lakes.gml added

comment:3 by krw1010, 10 years ago

The command line I'm using is:

ogr2ogr.exe -f "ESRI Shapefile" -a_srs "EPSG:4326" -skipfailures "Output Folder" "Input GML File"

I have attached the input GML as well.

Thank you!

comment:4 by Even Rouault, 10 years ago

I've not ARCMAP to confirm, but my hypothesis would be that the dot character in the SHAPE.AREA and SHAPE.LEN columns would be the cause for the issue.

A way of fixing that is to open the lakes.gfs file produced after the first attempt to read the GML file and replace <Name>SHAPE.AREA</Name> by <Name>SHAPE_AREA</Name> and <Name>SHAPE.LEN</Name> by <Name>SHAPE_LEN</Name> before reissuing a conversion with ogr2ogr

comment:5 by Even Rouault, 9 years ago

did you try the renaming ?

comment:6 by Even Rouault, 8 years ago

Resolution: invalid
Status: newclosed

Closing due to lack of feedback

Note: See TracTickets for help on using tickets.