[Mapserver-users] Appending a shapefile

Stepan Kafka stepan.kafka at centrum.cz
Thu Apr 3 14:21:02 EST 2003


You can use ms_newShapefileObj function with type = -2 (see documentation).
I use it frequently to add new shapes (point, line, poly) to shapefile.
Remember, you have to add new record to dbase by your own! It work well in
PHP-mapscript, I don't know, if it is implemented in other languages.

Stepan Kafka
Help Service Remote Sensing
tel: +420-327514118
mailto:kafka at email.cz
http://www.bnhelp.cz

> -----Pùvodní zpráva-----
> Od: mapserver-users-admin at lists.gis.umn.edu
> [mailto:mapserver-users-admin at lists.gis.umn.edu]za uživatele Dylan
> Rawlins
> Odesláno: 3. dubna 2003 12:55
> Komu: mapserver-users at lists.gis.umn.edu
> Pøedmìt: [Mapserver-users] Appending a shapefile
>
>
> 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
>
>




More information about the mapserver-users mailing list