koop-retired / koop-server

PROJECT DEPRECATED - DO NOT USE
Apache License 2.0
5 stars 7 forks source link

Large data exports to shp are missing some data after 10k rows #23

Closed chelm closed 10 years ago

chelm commented 10 years ago

Koop uses a paging strategy for large data downloads and if a dataset contains long attribute names ogr2ogr will truncate them to fit into the 10char limit of a shp file.

However since we use a VRT strategy (many small file virtually linked) the first layer gets truncated and the subsequent files' fields dont match. Ogr2ogr fails to add the data for those columns.

There seems to be a fix for this by using the -addfields option, but that is duplicating the fields and causing the dbf file to exceed its 2GB max size limit.

chelm commented 10 years ago

This has to do with field name truncation and fields not getting added after a name has been shortened. so the fix is to add "-addfield identity" to the ogr calls.

Closed by #24