OGR GPX driver creates duplicate field names in shapefile
|Reported by:||hamish||Owned by:||warmerdam|
If I try to convert a GPX file to a shapefile the resulting shapefile DBF contains a repeated column name:
ogr2ogr -f "ESRI Shapefile" gps_track gps_track_29apr2009.gpx
(it creates a number of shapefiles, e.g. track_points.shp)
dbview -e gps_track/track_points.dbf | less Field Name Type Length Decimal Pos track fid N 11 0 track seg N 11 0 track seg N 11 0 ele N 24 15 time D 8 0 magvar N 24 15 geoidheigh N 24 15 name C 80 0 cmt C 80 0 ...
note the repeated "track_seg_" field.
the ogr2ogr -sql option could be used to remap field names, but it is ambiguous as to which one you will rename.