[gdal-dev] shapefile enhancements

Even Rouault even.rouault at mines-paris.org
Mon Apr 28 14:48:52 PDT 2014


Le lundi 28 avril 2014 23:39:34, Jan Heckman a écrit :
> Hi,
> 
> I've used and maintained an offshoot shapefile library (thanks, Frank), and
> added bits of functionality when needed. There are two that I think might
> be of wider interest.
> 
> 1) possibility to have shapefiles up to 8 GB (instead of 4 GB in ogr or 2
> GB elsewhere);

I'm +/- 0 on this, since it might cause interoperabily issues. Actually I've 
added a creation option in GDAL 1.11 to avoid crossing the 2GB barrier.

> 2) implementing deletes.
> ad 1) this requires little more than replacing fseek() by _fseeki64() on a
> windows box and using the fact that size indicators are about words rather
> than bytes.
> The use of this feature is limited to library use; afaik gis programs (at
> least arcgis) will not be able to use such an extended shapefile.
> Next, portability might be an issue.
> ad 2) a quick delete without closing and rewriting the .shp and /or the
> .dbf file can obviously be useful. Shapefile as well as dBase III files
> offer handles to do this.

Not sure to understand what you call by delete here. Is it auto-compaction of 
files when deleting a record ? something like DeleteFeature() + REPACK in the 
shapefile driver ?

> Issues:
> Arcgis wil not recognize .dbf with records marked for deletion (by starting
> a record with an asterix instead of a space character);
> the (ogr) dbase driver will equally disregard deleted records.
> Result: at the end of the session using the shapefile library, the
> shapefile can be handled without a major file-rewrite, but the .dbf needs
> to have the deleted records removed 'physically'. Still, this can be done
> relatively quickly when closing the file.

Hum, shapelib already supports deleting dbf record and the ogr shapefile driver 
does honour that. So, you are saying that ArcGIS doesn't handle that properly 
?

> Portability might again be an issue.
> 
> So,does anyone need these features, and is it useful to start a discussion
> how to implement either of these enhancements?
> 
> regards,
> Jan

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list