[gdal-dev] What is the maximum number of fields a shapefile can contain?
issworld2000 at yahoo.com
Sat Jun 10 10:28:06 PDT 2017
When converting an .osm file to .shp files with ogr2ogr.exe, one needs to define a list of required fields in gdal-data\osmconf.ini file.
I defined today a total of 338 field names, and the ogr2ogr.exe succeeded successfully in converting the .osm file to a .shp file containing all those 338 fields. 2 additional fields are added on top of 338 fields (osm_id, osm_way_id). Here is a screenshot of the fields from the .shp file opened in QGIS (QGIS lists fields from 0 as a starting index):
When .dbf file which is created along the .shp file is being opened in DBF Viewer, it also shows 340 fields:
My question is: how is this possible if a .shp file (.dbf file that is) can only store maximum of 255 fields? This is what Jukka Rahkonen pointed to me, a couple of months ago.
Does this mean that when performing conversion, the ogr2ogr.exe is using some other shapefile format?
I would welcome any kind of reply.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev