[Mapserver-users] Adding Features to PostGIS Layer - Confused

Daniel Morissette morissette at dmsolutions.ca
Wed Jan 15 14:40:12 PST 2003


Benjamin Wragg wrote:
> 
> >>Unless I'm mistaken, the $layer->addFeature() method doesn't even
> apply
> >>to shapefiles.  It is only there to create inline features in a layer
> >>(in memory).
> 
> So when a feature is added this way, can it be labeled as well as used
> to select features in another layer (PostGIS layer)?
> 


I believe the answer is yes to both questions, but I haven't done this
myself so I could be wrong.


> >>And once again, for databases like PostGIS I think doing direct SQL
> >>calls to add or update feature should be the preferred approach.
> 
> What else do you recommend?
> 
> As has been pointed out, the editing functions of MapServer don't
> support PostGIS layers, but are there any other methods that don't
> support PostGIS layers. ie Any of the queryByxxxxxx functions?
> 


The queryByXxxx() functions do work with PostGIS layers and all other
data sources AFAIK.  And actually most of what you find in the layerObj
(if not everything) works for all data sources. 

Editing shapefiles is done via a completely independent class, the
shapefileObj.  This class bypasses MapServer layerObj methods and works
directly with the low-level shapelib functions.

Daniel
-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the MapServer-users mailing list