[Shapelib] Shapefile creation

Mateusz Loskot mateusz at loskot.net
Tue Oct 31 00:07:50 PST 2006

Mike.Sexton at ga.gov.au wrote:
> For example: shpadd testfile.shp 10.0 1.0 20.0 2.0 30.0 3.0, works fine
> but I want to load an X,Y file containing 1000’s of point into the
> shapefile. I just cant see how to stream the coordinates into the ahpadd
> program
> Any advice would be greatly appreciated


Here is a tiny script that shows how to use shapelib with Python
and generates shapefiles with 500 point features:


Feel free to use and customize it for your purposes.
It should be easy to change this script to read points from text file,
construct shape geometry and load to shapefile.

Mateusz Loskot

More information about the Shapelib mailing list