I have been looking around like crazy, not finding any specification which versions of dBase shapefiles support (ESRI shapefiles).

I found that GeoTools uses dBase III only, and Wikipedia says dBase IV only.

I'm writing a reader, how should I decide which formats to use, and are they any different?

  • Man called William Huber writes here that it is labeled as dBASE IV but dBASE III works just fine, too forums.esri.com/Thread.asp?c=3&f=38&t=104464%29. But there are quite a many shapefile readers already, perhaps you cold spend your time to something more exciting and valuable for the people? – user30184 Nov 11 '14 at 15:08
  • Writing your own reader might make sense if you are writing your own query/render engine. For instance, MapDotNet shapefile support includes simple attribute queries and a proprietary indexing schema for geometry or attribute indexes. – Russell at ISC Nov 11 '14 at 15:30

Having written a shapefile reader for MapDotNet, I recommend following the dBase IV spec. Once you start opening files from many sources you will find odd discrepancies, for instance older versions of the PostGIS tools filled null numeric with *.

  • dBase IV didn't exist when shapefile was created. The Esri shapefile implementation is based on dBase III+ (without memo support). – Vince Nov 11 '14 at 17:34
  • @Vince, looking at my old code I see at some point I replaced 4 with 3 in the "write header" code, but I worked off the IV spec and I don't recall any other incompatibilities. Old dBase specs are hard to dig up, I may have used IV because it was what I could find. Yes, memo is not supported. – Russell at ISC Nov 11 '14 at 18:15
  • Oh, and the code has been used extensively over close to a decade. – Russell at ISC Nov 11 '14 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.