<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Hi-</DIV><DIV><BR class="khtml-block-placeholder"></DIV>Update on my previous question, sorry for not including this piece of information. This is the error I get when I try to manually upload a point to my postgis featureserver instance:<DIV><BR><DIV>% echo '{"id":1, "geometry":{"type":"Point", "coordinates":[[0,5]]}}' | curl -k -d @- <A href="https://portsmouthresponse.unh.edu/cgi/featureserver.cgi/scribble/">https://portsmouthresponse.unh.edu/cgi/featureserver.cgi/scribble/</A></DIV><DIV>An error occurred: float argument required</DIV><DIV>  File "/sw/lib/python2.5/site-packages/FeatureServer/Server.py", line 273, in cgiHandler</DIV><DIV>    format, content = service.dispatchRequest( params, path_info, host, post_data, request_method, accepts )</DIV><DIV>  File "/sw/lib/python2.5/site-packages/FeatureServer/Server.py", line 137, in dispatchRequest</DIV><DIV>    result = method(action)</DIV><DIV>  File "/sw/lib/python2.5/site-packages/FeatureServer/DataSource/PostGIS.py", line 113, in create</DIV><DIV>    values = ", ".join(self.value_formats(feature)+["SetSRID('%s'::geometry, %s) " % (self.to_wkt(feature.geometry), self.srid)])</DIV><DIV>  File "/sw/lib/python2.5/site-packages/FeatureServer/DataSource/PostGIS.py", line 70, in to_wkt</DIV><DIV>    return "POINT(%s)" % coords_to_wkt(coords)</DIV><DIV>  File "/sw/lib/python2.5/site-packages/FeatureServer/DataSource/PostGIS.py", line 67, in coords_to_wkt</DIV><DIV>    return ",".join(["%f %f" % tuple(c) for c in coords])</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>In particular, I'm not sure what the "float argument required" message means.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks in advance,</DIV><DIV>Rob Braswell</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV>Begin forwarded message:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><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">Bobby Braswell &lt;<A href="mailto:rob.braswell@unh.edu">rob.braswell@unh.edu</A>&gt;</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">October 19, 2007 2:53:42 PM EDT</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 connection</B></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <DIV><BR class="khtml-block-placeholder"></DIV><DIV>Hi-</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I am trying to set up a postGIS backend to featureserver. I was previously using the DBM option, and this worked for me (it's awesome, by the way, thanks) with no problems. With postgis I am missing something, perhaps obvious, but I'm sorry that I couldn't find the answer in the archives or docs.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>My config file looks like the example in the documentation:</DIV><DIV><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">[metadata]</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">default_service=GeoJSON</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">[scribble]</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">type=PostGIS</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">dsn=dbname=mydata</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">layer=mylayer</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">fid=ogc_fid</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">geometry=wkb_geometry</FONT></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I believe I have settled access and permissions issues, and I have a postGIS database called mydata, with a table called mylayer, defined as follows:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">CREATE TABLE mylayer (ogc_fid INTEGER, wkb_geometry GEOMETRY;</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">GRANT ALL ON TABLE mylayer TO www;</FONT></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The database was built using a postgis template and has the usual geometry_columns and spatial_ref_sys tables.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>However I get the following error from the browser: </DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">Error: invalid label</FONT></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">Source File: <A href="https://portsmouthresponse.unh.edu/cgi/featureserver.cgi/scribble/all.json?maxfeatures=20&callback=load_list">https://portsmouthresponse.unh.edu/cgi/featureserver.cgi/scribble/all.json?maxfeatures=20&amp;callback=load_list</A></FONT></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">Line: 1, Column: 11</FONT></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">Source Code:</FONT></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">{"features": []}</FONT></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>This line is what I get if I issue the create command using curl. I'm not sure what "invalid layer" is referring to.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>One question is: should I indeed be creating the table myself? In the DBM case, featureserver created the database in /tmp.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Also: I feel like the table should have more columns corresponding to the attributes of the geometric objects I am uploading, for some reason I'm not clear on how many those are or where they are coming from. I hope I have provided a clear explanation of my problem and that it is not</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Rob Braswell</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>