[Mapserver-users] Appending a shapefile

Dylan Rawlins dylan at visit27.com
Thu Apr 3 05:55:01 EST 2003


I need to find a way of creating a shapefile that allows users to add points
to the file as well as attribute information that is collected from a form.
I have managed to set it all up and it works fine except that it only allows
one point (the latest one) to be stored. What I need to be able to do is
append to the theme rather than re-create it every time.

What I am doing at the moment is storing each x and y coord in the dbf file
as it is added - along with other attribute info.  Then when the user clicks
a point on the map I run a loop through the dbf file. The loop reads each
record and re-creates each point. Once the loop is finished I create the new
point that has just been clicked and at the same time I update the dbf  file
with the new point's x and y etc. This is a bit messy but it works.

Is there any better way of doing this?

Many thanks
Dylan




More information about the mapserver-users mailing list