Shapefile C Library

External: index
Internal: |- preamble -|- downloads -|- end -|

Preamble

2010-08-16: UGH! In some subsequent tests using the MSVC6 DSP build files, there is a bug in MSVC10 (2010) Express to prevent it from converting, or 'upgrading' as it calls it, these DSP files! Microsoft have fixed this, which they advise will be in the next release - see connect. But for the moment you MUST use an earlier version, like 7.1, 8, or 9 to convert them, then load that now sln/vcproj set into MSVC10! BAH!
Updated to using the SVN shapelib source, where a NEW file had been added to the shapelib, namely 'safileio.c'.

As the site http://shapelib.maptools.org/ states, The Shapefile C Library provides the ability to write simple C programs for reading, writing and updating (to a limited extent) ESRI Shapefiles, and the associated attribute file (.dbf). What is a Shapefile? If you don't know, you probably don't need this library. The Shapefile format is a working and interchange format promulagated (sic) by ESRI for simple vector data with attributes.

The file format actually consists of three mandatory files.

XXX.shp - holds the actual vertices.
XXX.shx - hold index data pointing to the structures in the .shp file.
XXX.dbf - holds the attributes in xBase (dBase) format.  

And these are sometimes accompanied by other optional files. See http://en.wikipedia.org/wiki/Shapefile for further reading. One important optional file is the 'projection' file, XXX.prj, holding specific projection information, like
 GEOGCS["WGS 84",DATUM["WGS_1984",..., or
 PROJECTION["Lambert_Azimuthal_Equal_Area"],...,UNIT["Meter",1.0],...
all in a markup language called WKT (Well-known text). But this file is not specifically dealt with by this 'shapelib'.

While most utilities can be compiled directly form the shapelib source, to be able to compile all the utilities, specifically those in the 'contrib' folder, there is a prerequisite of PROJ.4 (http://trac.osgeo.org/proj/) - a Cartographic Projections library. This library adds the capable of handling the 'projection' file, and other data 'transformation'.

Since BOTH these sources are distributed under GPL, or other very liberal licenses, today MOST tools, like say GRASS (Geographic Resources Analysis Support System), have shapefile capability.


top

Downloads

Take care downloading and running executables from the web!

If you have already downloaded the source, then you only need shp-msvc-02.zip. Unzip this into the 'contrib' folder, preserving the 'msvc' folder, and load the shapelib.dsw in your favorite version of MSVC. There is a README.msvc.txt in the zip which explains more.

If you ONLY want to try the executables, then shp-src-02.zip is for you. It contains my shapelib EXE utilities, built with MSVC8 (2005) Express, using the /MD|/MDd runtime, and also includes the Release static 'shapelib.lib', 'shpgeo.lib', and 'proj.lib'.

Date Link Size MD5
2010/08/16 shp-src-02.zip 916,770 8406d5466eac6c49b6f73d4cfad0bf16
2010/08/16 shp-msvc-02.zip 38,064 30402b9e8e3c381ff3e5a05c4d3e129e
2010/08/16 shp-bin-02.zip 616,856 eed926d4a2724fc669ab3483032eba50

Older versions

Date Link Size MD5
2010/08/12 shp-bin-01.zip 592,102 4da7d95db142739d82e7ed8daa00f818
2010/08/12 shp-src-01.zip 238,902 54fc782cd3c53b4bcc8a0aaa8f6e0ce1
2010/08/12 shp-msvc-01.zip 37,004 4b6c83454babb5a163ba153ad8487e48

Take care downloading and running executables from the web!


top

EOP - shapelib.htm

checked by Tidy  Valid HTML 4.01 Transitional