[Mapserver-users] Appending a shapefile
Jon Shorie
jshorie at medinaco.org
Thu Apr 3 05:33:49 PST 2003
On Thursday 03 April 2003 05:55, Dylan Rawlins wrote:
> 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
>
You may want to store the data in Mysql or another low end database rather
than .dbf files. This would permit you to not have to rebuild the dbf every
time you add a point. You would just issue an sql insert command to add the
point to the database.
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list