📄 shapelib.html
字号:
<html><head><title>Shapefile C Library V1.2</title></head><body><h1>Shapefile C Library V1.2</h1><h2>Purpose</h2>The Shapefile C Library provides the ability to write simple C programsfor reading, writing and updating (to a limited extent) ESRI Shapefiles,and the associated attribute file (.dbf).<p><h2>Manifest</h2><ul><li> <b>shapelib.html</b>: This file - general documentation on the Shapefile C Library.<p><li> <b><a href="shp_api.html">shp_api.html</a></b>: Documentation for the API for accessing the .shp/.shx files. <p><li> <b><a href="dbf_api.html">dbf_api.html</a></b>: Documentation for the API for accessing the .dbf attribute files. <p><li> <b>shpopen.c</b>: C code for access to .shp/.shx vertex files.<p><li> <b>dbfopen.c</b>: C code for access to .dbf attribute file.<p><li> <b>shapefil.h</b>: Include file defining all the services of dbfopen.c and shpopen.c.<p><li> <b>contrib/</b>: A directory of "in progress" contributed programsfrom Carl Anderson.<p><li> <b>dbfcreate.c</b>: Simple example program for creating a new .dbf file. <p><li> <b>dbfadd.c</b>: Simple example program for adding a record to a .dbf file.<p><li> <b>dbfdump.c</b>: Simple example program for displaying the contents of a .dbf file.<p><li> <b>shpcreate.c</b>: Simple example program for creating a new .shp and .shx file.<p><li> <b>shpadd.c</b>: Simple example program for adding a shape to an existing shape file.<p><li> <b>shpdump.c</b>: Simple program for dumping all the vertices in a shapefile with an indicating of the parts.<p><li> <b>shputils.c</b>: Complex contributed program capable of clipping and appending shapefiles as well as a few other things. Type shputils after building to get a full usage message.<p><li> <b>Makefile</b>: A simple makefile to compile the library and example programs.<p><li> <b>makeshape.sh</b>: A simple script for running some of the example programs.<p><li> <b>shptest.c</b>: A simple test harnass to generate each of the supported types of shapefiles. <p><li> <b>shptree.c</b>: Implements a simple quadtree algorithm for fastspatial searches of shapefiles.<p><li> <b>shptreedump.c</b>: A simple mainly showing information on quadtrees build using the quad tree api.<p><li> <b>stream1.sh</b> - A test script, which should produce stream1.out. Note this will only work if you have the example data downloaded.<p><li> <b>stream1.out</b>: Expected output of stream1.sh test script.<p><li> <b>stream2.sh</b>: A test script, which should produce stream2.out.<p><li> <b>stream2.out</b>: Expected output of stream2.sh test script.<p><li> <b>pyshapelib-0.1</b>: Prototype contributed Python bindings.<p></ul><h2>What is a Shapefile?</h2>If you don't know, you probably don't need this library. The Shapefileformat is a new working and interchange format promulagated by ESRI (http://www.esri.com/) for simple vector data with attributes. It isapparently the only file format that can be edited in ARCView 2/3, and canalso be exported and imported in Arc/Info. <p>An excellent white paper on the shapefile format is available from ESRI,but it is .pdf format, so you will need Adobe Acrobat to browse it.<p>The file format actually consists of three files.<p><pre>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. </pre><h2>Release Notes</h2>To get notification of new releases of Shapelib <i>subscribe</i> to the project at www.freshmeat.net. This is currently the only reliableway of finding out about new releases since there is no shapelib specificmailing list.<p><b>Release 1.2.9</b>: Good support for reading and writing NULL fields in .dbf files, good support for NULL shapes and addition of theDBFGetFieldIndex() functions (all contributed by Jim Matthews).<p>An upgraded shputils.c has been contributed by Bill Miller. Daniel Morissette contributed DBFGetNativeFieldType(). Better error checkingfor disk errors in dbfopen.c. Various other bug fixes and safety improvements.<p><b>Release 1.2.8</b>: Added hacked libtool support (supplied by Jan)and "rpm ready" install logic.<p><b>Release 1.2.7</b>: Fix record size (was 4 bytes too long). Modify SHPReadObject() to handle null shapes properly. Use atof() instead ofsscanf(). Support .DBF as well as .dbf.<p><b>Release 1.2.6</b>: Now available under old MIT style license, or at theusers option, LGPL. Added the contrib directory of stuff from Carl Andersonand the shptree.c API for quadtree based spatial searches.<p><b>Release 1.2.5</b>: SHPOpen() now forcably uses "rb" or "r+b" access stringto avoid common mistakes on Windows. Also fixed a serious bug with .dbffiles with a 'F' field type.<p><b>Release 1.2.4</b>: DBFOpen() will now automatically translate a .shpextension to .dbf for convenience. SHPOpen() will try datasets with lowerand uppercase extension. DBFAddField() now returns the field number,not TRUE/FALSE.<p><b>Release 1.2.3</b>: Disable writing measures to multi-patches as ArcViewseems to puke on them (as reported by Monika Sester). Add white space trimming, and string/numeric attribute interchangability in DBF APIas suggested by Steve Lime. Dbfdump was updated to include several reporting options.<p><b>Release 1.2.2</b>: Added proper support for multipatch (reading and writing) - this release just for testing purposes.<p><b>Release 1.2</b> is mostly a rewrite of the .shp/.shx access API to account for ArcView 3.x 3D shapes, and to encapsulate the shapes in a structure. Existing code using the shapefile library will require substantial changesto use release 1.2.<p><b>Release V1.1</b> has been built on a number of platforms, and used by a number of people successfully. V1.1 is the first release with the xBase API documentation.<p><h2>Maintainer</h2>This library is maintained by me (Frank Warmerdam) on my own time. Please send me bug patches and suggestions for the library. Email can be sent to warmerdam@pobox.com.<p>The current status of the Shapelib code can be found somewhere off myhome page at http://pobox.com/~warmerdam.<p>The shputils.c module was contributed by Bill Miller (NC-DOT) who can bereached at bmiller@doh.dot.state.nc.us. I had to modify it substantiallyto work with the 1.2 API, and I am not sure that it works as well as itdid when it was originally provided by Bill.<p><h2>Credits</h2>I didn't start this section anywhere near soon enough, so alot of earliercontributors to Shapelib are lost in pre-history.<ul><li> Bill Miller (NY-DOT) for shputils.c<li> Carl Anderson for the contents of the contrib directory, and the "tuple" additions to dbfopen.c.<li> Andrea Giacomelli for patches for dbfopen.c.<li> Doug Matthews for portability improvements.<li> Jan-Oliver Wagner for convincing me to make it available under LGPL,shared library support, and various other patches.<li> Dennis Christopher (of Avenza) for testing and bug fixes.<li> Miko Syrj
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -