[Featureserver] Service type does not support adding features

Christopher Schmidt crschmidt at metacarta.com
Wed Aug 12 12:02:50 EDT 2009


On Wed, Aug 12, 2009 at 11:55:03AM -0400, Alexandre Dube wrote:
> Hi,
> 
>   While trying to create post new features from OpenLayers to a 
> type=PostGIS layer, I get the following error message :
> 
> <error message>
> An error occurred: Service type does not support adding features.

The URL your'e posting to is not a service -- that is, a format --
which supports adding features. (GML, etc. do not support saving,
while other services like GeoJSON do.)

-- Chris 


>   File "/opt/featureserver/trunk/web_request/handlers.py", line 219, in cgi
> 
>     accepts = accepts )
> 
>   File "/opt/featureserver/trunk/FeatureServer/Server.py", line 152, in 
> dispatchRequest request.parse(params, path_info, host, post_data, 
> request_method)  File 
> "/opt/featureserver/trunk/FeatureServer/Service/__init__.py", line 77, 
> in parse
>    actions = self.handle_post(params, path_info, host, post_data, 
> request_method, format_obj = format_obj)
> 
>   File "/opt/featureserver/trunk/FeatureServer/Service/__init__.py", 
> line 183, in handle_post
> 
>     raise Exception("Service type does not support adding features.")
> </error message>
> 
>   It's not the first time I use FeatureServer + PostGIS but it's the 
> first time I get this error.  I tried with trunk & 1.12 but got the 
> error with both.
> 
>   I copied the GeoJSON in the POST request, put it in a file and 
> executed the following command :
> 
> curl -d @myfile.geojson 
> http://myhost/featureserver/trunk/featureserver.cgi/gmap_popp/create.geojson
> 
>   and it worked.  The feature was added to the PostGIS table and I can 
> see it in my OpenLayers application.
> 
>   What could be wrong ?
> 
> <config-sample>
> [gmap_popp]
> type=PostGIS
> dsn=host=localhost port=myport dbname=gmap user=myuser
> layer=popplace
> fid=gid
> geometry=the_geom
> srid=42304
> </config-sample>
> 
>   Thanks,
> 
> -- 
> Alexandre Dubé
> Mapgears
> www.mapgears.com
> 
> _______________________________________________
> Featureserver mailing list
> Featureserver at openlayers.org
> http://featureserver.org/mailman/listinfo/featureserver

-- 
Christopher Schmidt
MetaCarta



More information about the Featureserver mailing list