[Featureserver] PostGIS insert statement question
Josh Livni
josh at umbrellaconsulting.com
Fri May 15 17:20:57 EDT 2009
Odd, it looks like the current svn update method should work with any
geometry column name you specify..
- What version are you using (svn trunk?)
- What happens if you remove the geometry= line from your layer config?
-Josh
On Fri, May 15, 2009 at 1:33 PM, Jennifer Strahan <jennifer at greeninfo.org>wrote:
> Hello Everyone,
>
> I'm hoping someone can suggest how to solve an error I'm getting when
> trying to insert a record into a PostGIS datasource:
>
> An error occurred: column "geometry" of relation "padus_v1_mn_edits" does
> not exist
> LINE 1: ...T INTO "padus_v1_mn_edits" (comm_date, wdpa_name, geometry, ...
> ^
>
> File "/var/www/featureserver-pine/web_request/handlers.py", line 219, in
> cgi
> accepts = accepts )
> File "/var/www/featureserver-pine/FeatureServer/Server.py", line 167, in
> dispatchRequest
> result = method(action)
> File "/var/www/featureserver-pine/FeatureServer/DataSource/PostGIS.py",
> line 116, in create
> cursor.execute(str(sql), self.feature_values(feature))
>
>
>
> Looks like the insert statement uses the column name "geometry" when it
> should be "the_geom"
>
> Below is my config for the layer. Any help would be much appreciated.
> I guess I can just rename my geometry column. But I was hoping to get
> it working with the current name.
>
> Thanks,
> Jennifer
>
> #Use this layer to submit and display user edits
> [padus_v1_mn_edits]
> type=PostGIS
> dsn=dbname=db_pine password=xxxxxx user=pine
> layer=padus_v1_mn_edits
> geometry=the_geom
> fid=gid
> srid=900913
> attribute_cols=us_id, manag_desc, wdpa_name, gis_acres, gap_status,
> gis_source, sourcedate, class_desc, owner_desc, comments, comm_name,
> comm_org, comm_email, comm_date
> gaping_security_hole=yes
>
> --
> Jennifer Strahan, GIS Specialist
> GreenInfo Network - www.greeninfo.org -
> Information and Mapping in the Public Interest
>
> **As of Oct. 13, 2008 we have a new address**
> 564 Market Street, Suite 510
> San Francisco CA 94104
>
> Phone: 651-917-0191
> Fax: 415-979-0371
> Email: jennifer at greeninfo.org
>
> _______________________________________________
> Featureserver mailing list
> Featureserver at openlayers.org
> http://featureserver.org/mailman/listinfo/featureserver
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/featureserver/attachments/20090515/175ea462/attachment.html
More information about the Featureserver
mailing list