[gdal-dev] GDAL, OGR and Shapelib

Frank Warmerdam warmerdam at p...
Thu Jul 19 23:37:38 EDT 2001


Ben Discoe wrote:
> 
> Before moving to GDAL, my code was using Shapelib; now i suspect that i
> don't have to link with an external Shapelib anymore, since Shapelib can be
> (is?) compiled into GDAL. However, the necessary headers (e.g. that define
> 'SHPObject') aren't in the GDAL 'distribution', only in the CVS files.
> 
> I presume that OGR encapsulates Shapelib, so one way would be port my
> Shapelib code to use OGR instead, but that introduces a lot of overhead -
> Shapelib is far simpler and more direct.
> 
> Advice? Could the Shapelib classes be added the GDAL-exposed headers?

Ben,

I am not too keen on installing shapefil.h with GDAL's include files as
a standard thing for GDAL. I think you would be pretty safe just
carrying a copy of shapefil.h around with VTP. As long as you stick 
to calling the API (as opposed to diddling with the structures) you should
be OK for a long time to come. Shapelib is pretty "stable". 

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list