
Python bindings for Shapelib
============================

These are two python modules for shapelib created with SWIG.

Shapelib is a free software library for reading and writing ESRI shape
files and can be found at http://gdal.velocet.ca/projects/shapelib. 

SWIG is tool that can generate wrappers of C and C++ libraries for a
variety of scripting languages. It's homepage is www.swig.org.

The two modules here wrap the shape file reading and writing API and the
DBF file reading and writing API. The shape file bindings are currently
limited to 2-dimensional data.


Requirements
------------

To compile the bindings, you need shapelib 1.2.8. Older versions may or
may not work, I've only tested the code with 1.2.8.

SWIG is not required. The files generated by SWIG are contained in the
archive. If modify shapelib.i or dbflib.i and need to recreate the
generated files, you need at least SWIG 1.3.

You also need Python, of course. If you installed prebuilt packages such
as RPMs of some Linux distributions, please make sure that the
development package is also installed.


License
-------

The shapelib python bindings are covered by the LGPL. See COPYING for
more information.


Compilation
-----------

To compile the bindings, unpack the archive under the shapelib archive
or move the directory there if you've already unpacked it. The Makefile
expects to find some shapelib files in the parent directory.

On platforms similar enough to Linux, a simple 'make' should suffice to
build the bindings. On other platforms you may have to modify the
makefile, sorry. Python distutils support is planned for the future.


Installation
------------

Copy the *.so and *.py files to a directory in your python path. A
commonly used place is your python interpreter's site-packages directory
(by default /usr/local/lib/python1.5/site-packages).


Documentation
-------------

There's no real documentation for the python bindings themselves, but
there's a simple demo/test script called pytest.py.

The change history is recorded in NEWS and in detail in ChangeLog.
