Which C++ library for ESRI shapefiles to choose?

Sergey Borodavkin picture Sergey Borodavkin · Jan 26, 2010 · Viewed 14.1k times · Source

Does anyone have an experience in processing (reading) ESRI shapefiles from C++?

I have found at least 2 open source libraries: ShapeLib C library and OGR. Which one is better? Does anybody used one of them? How about the experience?

Answer

mloskot picture mloskot · Jan 26, 2010

The OGR Shapefile driver from GDAL/OGR directly uses implementation of Shapelib, so there is no difference actually. If you check the OGR source tree, you will find Shapelib files like shpopen.c and dbfopen.c.

Also, Frank Warmerdam is the author of both, Shapelib and OGR and I can confirm myself that Frank keeps the shpopen.c and dbfopen.c in synch between Shapelib and OGR.

To summary, there is no difference between Shapelib and OGR regarding the implementation of Shapefile format specification.