Please go ahead and try use the svn trunk instead (r580).&nbsp; If that doesn&#39;t work, reply including the relevant layer of your featureserver.cfg, and the latest traceback<br><br>cheers,<br><br>&nbsp; -josh<br><br><div class="gmail_quote">
On Thu, Dec 4, 2008 at 9:09 AM, Yves Moisan <span dir="ltr">&lt;<a href="mailto:yves.moisan@boreal-is.com">yves.moisan@boreal-is.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Josh,<br>
<div class="Ih2E3d"><br>
&gt; Hi Yves,<br>
&gt;<br>
&gt;<br>
&gt; Your geojson upload to featureserver does indeed include the geometry<br>
&gt; twice: &nbsp;Both described as &#39;Point&#39; and in your the_geom column.<br>
<br>
</div>Right<br>
<div class="Ih2E3d"><br>
&gt; So you don&#39;t want to include the_geom in your upload - remove it from<br>
&gt; your geojson and it should work.<br>
<br>
</div>Indeed I tried that before I posted to the list. &nbsp;I&#39;m using FS 1.12 but<br>
at any rate I removed the_geom from my file and called with<br>
create.geojson this time :<br>
<div class="Ih2E3d"><br>
C:\temp&gt;curl -d @fs-test.json<br>
</div><a href="http://my.server.com:8084/PGTEST/create.geojson" target="_blank">http://my.server.com:8084/PGTEST/create.geojson</a><br>
An error occurred: float argument required<br>
<div class="Ih2E3d"> &nbsp;File &quot;C:\featureserver-1.12\FeatureServer\Server.py&quot;, line 242, in<br>
wsgiHandler<br>
 &nbsp; &nbsp;format, content = service.dispatchRequest( params, path_info, host,<br>
post_data, request_method, accepts )<br>
 &nbsp;File &quot;C:\featureserver-1.12\FeatureServer\Server.py&quot;, line 145, in<br>
dispatchRequest<br>
 &nbsp; &nbsp;result = method(action)<br>
 &nbsp;File &quot;C:\featureserver-1.12\FeatureServer\DataSource\PostGIS.py&quot;, line<br>
</div>138, in create<br>
 &nbsp; &nbsp;values = &quot;, &quot;.join(self.value_formats(feature)+[&quot;SetSRID(&#39;%<br>
s&#39;::geometry, %s) &quot; % (self.to_wkt(feature.geometry), sel<br>
f.srid)])<br>
<div class="Ih2E3d"> &nbsp;File &quot;C:\featureserver-1.12\FeatureServer\DataSource\PostGIS.py&quot;, line<br>
</div>90, in to_wkt<br>
 &nbsp; &nbsp;return &quot;POINT(%s)&quot; % coords_to_wkt(coords)<br>
<div class="Ih2E3d"> &nbsp;File &quot;C:\featureserver-1.12\FeatureServer\DataSource\PostGIS.py&quot;, line<br>
</div>87, in coords_to_wkt<br>
 &nbsp; &nbsp;return &quot;,&quot;.join([&quot;%f %f&quot; % tuple(c) for c in coords])<br>
<br>
I don&#39;t see what float argument is missing. &nbsp;Do I need to specify the<br>
SRID ?<br>
<br>
Cheers,<br>
<font color="#888888"><br>
Yves<br>
</font><div><div></div><div class="Wj3C7c"><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; In general, featureserver shouldn&#39;t return your the_geom column in the<br>
&gt; first place, but that&#39;s another story (an OT side note: &nbsp;the FS docs<br>
&gt; should explain, in the postgis section, how to have it return only a<br>
&gt; subset of columns if you want -- although again, it shouldn&#39;t be<br>
&gt; returning your the_geom column column at all assuming it&#39;s the only<br>
&gt; geometry column on the table &nbsp;)<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; -Josh<br>
&gt;<br>
&gt; On Thu, Dec 4, 2008 at 8:48 AM, Yves Moisan<br>
&gt; &lt;<a href="mailto:yves.moisan@boreal-is.com">yves.moisan@boreal-is.com</a>&gt; wrote:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Hi All,<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; I&#39;m trying to upload a .json file<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; {&quot;features&quot;: [{&quot;geometry&quot;: {&quot;type&quot;: &quot;Point&quot;, &quot;coordinates&quot;:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; [[411869.733939, 8831369.48172]]}, &quot;id&quot;: 99999, &quot;properties&quot;:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; {&quot;comment&quot;: &quot;99999&quot;, &quot;the_geom&quot;:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &quot;0101000080BCD28DEF5A23194199456ACF30D86041A78B461654CB9540&quot;}}]}<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; C:\temp&gt;curl -d @fs-test.json<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://my.machine:8084/PGTEST/create.json" target="_blank">http://my.machine:8084/PGTEST/create.json</a><br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; An error occurred: column &quot;the_geom&quot; specified more than once<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; LINE 1: ...SERT INTO &quot;geo_survey_gps_pt&quot; (comment, the_geom,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; the_geom) ...<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;File &quot;C:\featureserver-1.12\FeatureServer\Server.py&quot;, line<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; 242, in<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; wsgiHandler<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;format, content = service.dispatchRequest( params,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; path_info, host,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; post_data, request_method, accepts )<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;File &quot;C:\featureserver-1.12\FeatureServer\Server.py&quot;, line<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; 145, in<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; dispatchRequest<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;result = method(action)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;File &quot;C:\featureserver-1.12\FeatureServer\DataSource<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; \PostGIS.py&quot;, line<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; 142, in create<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cursor.execute(str(sql), self.feature_values(feature))<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; If I erase the &quot;the_geom&quot; property from my file :<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; {&quot;features&quot;: [{&quot;geometry&quot;: {&quot;type&quot;: &quot;Point&quot;, &quot;coordinates&quot;:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; [[411869.733939, 8831369.48172]]}, &quot;id&quot;: 99999, &quot;properties&quot;:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; {&quot;comment&quot;: &quot;99999&quot;}}]}<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; I get :<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; C:\temp&gt;curl -d @fs-test.json<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://my.machine:8084/PGTEST/create.json" target="_blank">http://my.machine:8084/PGTEST/create.json</a><br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; An error occurred: new row for relation &quot;geo_survey_gps_pt&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; violates<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; check constraint &quot;enforce_srid_the_geom&quot;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;File &quot;C:\featureserver-1.12\FeatureServer\Server.py&quot;, line<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; 242, in<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; wsgiHandler<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;format, content = service.dispatchRequest( params,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; path_info, host,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; post_data, request_method, accepts )<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;File &quot;C:\featureserver-1.12\FeatureServer\Server.py&quot;, line<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; 145, in<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; dispatchRequest<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;result = method(action)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;File &quot;C:\featureserver-1.12\FeatureServer\DataSource<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; \PostGIS.py&quot;, line<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; 142, in create<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cursor.execute(str(sql), self.feature_values(feature))<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; because there is indeed a constraint in the table.<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Pointers appreciated.<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; TIA,<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Yves Moisan<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; _______________________________________________<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Featureserver mailing list<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:Featureserver@openlayers.org">Featureserver@openlayers.org</a><br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://featureserver.org/mailman/listinfo/featureserver" target="_blank">http://featureserver.org/mailman/listinfo/featureserver</a><br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br>