[Mapserver-users] Appending a shapefile

Paul Spencer spencer at dmsolutions.ca
Thu Apr 3 09:51:17 EST 2003


Dylan, you could use MapScript.  The PHP flavour of mapscript provides 
direct access to shapefiles, you can append points directly using PHP 
commands, and then write the associated attribute information to the DBF 
file.

I presume that this functionaonality exists in other flavours of MapScript.

If you are interested in this solution, I can send you some example code.

Cheers,

Paul

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
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 

-- 
Paul Spencer
Applications and Software Development
DM Solutions Group Inc.
http://www.dmsolutions.ca





More information about the mapserver-users mailing list