<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Resolved this issue by replacing geometry type MULTIPOLYGON to POLYGON when creating the PostGIS table. &nbsp;Sharing with the list in the hope that it might help others.</div><div><br></div><div>So far I am very, very impressed with this project...</div><br><div><div>On Aug 18, 2008, at 2:33 PM, Jonathan Huxley wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Seems this is what's causing the problem:<div><br></div><div><div>An error occurred: new row for relation "scribble" violates check constraint "enforce_geotype_the_geom"</div><div><br></div><div>&nbsp;&nbsp;File "/opt/lampp/htdocs/featureserver/FeatureServer/Server.py", line 298, in cgiHandler</div><div>&nbsp;&nbsp; &nbsp;format, content = service.dispatchRequest( params, path_info, host, post_data, request_method, accepts )</div><div>&nbsp;&nbsp;File "/opt/lampp/htdocs/featureserver/FeatureServer/Server.py", line 145, in dispatchRequest</div><div>&nbsp;&nbsp; &nbsp;result = method(action)</div><div>&nbsp;&nbsp;File "/opt/lampp/htdocs/featureserver/FeatureServer/DataSource/PostGIS.py", line 142, in create</div><div>&nbsp;&nbsp; &nbsp;cursor.execute(str(sql), self.feature_values(feature))</div><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>From: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Jonathan Huxley &lt;<a href="mailto:jon@jonhuxley.com">jon@jonhuxley.com</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Date: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">August 18, 2008 2:20:25 PM PDT</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="mailto:featureserver@openlayers.org">featureserver@openlayers.org</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Subject: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><b>PostGIS config help needed</b></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </div><div>Hi list,<br><br>Newbie question:<br><br>I think I need some hand-holding here. &nbsp;Trying to get FeatureServer working with a PostGIS back end.<br><br>Created a database called "spatial_data". &nbsp;Create a table called "scribble":<br><br>create table scribble (id serial, name varchar, description varchar);<br><br>select AddGeometryColumn<br>('spatial_data','scribble','the_geom','4326','MULTIPOLYGON',2);<br><br>Updated the featureserver.cfg page so that it looks like this:<br><br>[metadata]<br>default_service=GeoJSON<br>error_log=error.log<br><br>[scribble]<br>type=PostGIS<br>dsn=host=localhost dbname=spatial_data user=postgres password=<br>layer=scribble<br>fid=id<br>geometry=the_geom<br>srid=4326<br>attribute_cols=id,name,description,the_geom<br><br>Using OpenLayers. &nbsp;&nbsp;I create a polygon and select 'upload to server', no error message and when looking at Postgres the table is empty.<br><br>featureserver.cgi/scribble/all.atom shows an empty feed / XML output is empty also. &nbsp;Nothing in the Postgres log file. &nbsp;Confused. &nbsp;By the way, it works great using the default install (DBM) so I know the OpenLayers / FeatureServer solution isn't at fault.<br><br>Any help would be gratefully received!<br><br>Thanks,<br><br>Jon<br></div></blockquote></div><br></div></div>_______________________________________________<br>Featureserver mailing list<br><a href="mailto:Featureserver@openlayers.org">Featureserver@openlayers.org</a><br>http://featureserver.org/mailman/listinfo/featureserver<br></blockquote></div><br></body></html>