[Shapelib] Shapefile creation
Frank Warmerdam
warmerdam at pobox.com
Mon Oct 30 23:55:55 EST 2006
Mike.Sexton at ga.gov.au wrote:
> Hi,
>
>
>
> For some time I have been wondering how one produces shapefiles from
> scratch and have found it very difficult to find relevant information
>
> I have numerous files of X,Y data that describe points, lines and
> polygons that I wnt to capture as shapefiles.
>
>
>
> Fortunately I found the shapelib pages
>
>
>
> I downloaded the shapelib tar file and shocked myself when the make worked.
>
>
>
> I have been able to make some simple shapefiles by following the
> instructions, and I am now wondering how I can use my X,Y files.
>
>
>
> 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
Mike,
If you have even a modest mastery of C/C++, it should be possible to modify
the shpadd program to do what you want. Shpadd is really just intended
as a modest example of using the api.
If not, well, perhaps you could use some other scripting language to
transform your text file into a bunch of shpadd calls? If not, perhaps
you will have to beg a programmer of some stripe to help.
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 | President OSGeo, http://osgeo.org
More information about the Shapelib
mailing list