[Featureserver] Service type does not support adding features
Alexandre Dube
adube at mapgears.com
Wed Aug 12 11:55:03 EDT 2009
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.
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
More information about the Featureserver
mailing list