[Gdal-dev] Shp file support

Frank Warmerdam warmerdam at pobox.com
Wed Feb 25 14:21:27 EST 2004


Clay, Bruce wrote:
> Are shape files parsable through GDAL or do wee need to use shapelib
> instead?  I see from reflector traffic that shapelib used to be
> supported as a gdal format but when I try to open one with GDALopen I
> get a NULL pointer back.

Bruce,

The GDAL source tree contains two mostly seperate APIs.  The GDAL API is
used for accessing raster files and the OGR API is used for accessing
vector (feature) data.  So, you will need to open Shapefiles with OGROpen()
instead of GDALOpen().

More information on OGR is available from the OGR link on the GDAL main
web page (first paragraph).

There was a recent change where the "master" shapelib files were moved out
of the GDAL source tree, but a "downstream clone" of the required files are
still found in gdal/ogr/ogrsf_frmts/shape and Shapefiles remain fully
supported by the OGR API.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
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