Hi
Sending a update-request to GeoServer 0.96 works fine with non-geometry
attributes, but when I try to update the geometry I get an exception :-(.
Here is my request:
<wfs:Update typeName="rivers">
<wfs:Property>
<!-- this works
<wfs:Name>river_name</wfs:Name>
<wfs:Value>MyTestRiver</wfs:Value>
-->
<wfs:Name>rivers_geom</wfs:Name>
<wfs:Value> <!-- and this not
-->
<gml:LineString gid="rivers.19195.rivers_geom"
srsName="http://www.opengis.net/gml/srs/epsg.xml#31491">
<gml:coordinates>10.5,10.5 12.5,12.5</gml:coordinates>
</gml:LineString>
</wfs:Value>
</wfs:Property>
<ogc:Filter>
<ogc:FeatureId fid="rivers.19195"/>
</ogc:Filter>
</wfs:Update>
== The resulting exception: ==
java.lang.NullPointerException
at com.vividsolutions.jts.io.WKTWriter.writeFormatted(Unknown Source)
at com.vividsolutions.jts.io.WKTWriter.write(Unknown Source)
at
org.geotools.data.postgis.PostgisDataSource.makeModifySql(PostgisDataSource.java:1015)
at
org.geotools.data.postgis.PostgisDataSource.modifyFeatures(PostgisDataSource.java:930)
at org.vfny.geoserver.responses.TransactionResponse.doUpdate(Unknown
Source)[...]
btw, the Feature exists, getFeature returns:
<rivers fid="rivers.19195">
<river_name>myTestRiver</river_name>
<rivers_geom>
<gml:LineString gid="rivers.19195.rivers_geom"
srsName="http://www.opengis.net/gml/srs/epsg.xml#31491">
<gml:coordinates decimal="." cs="," ts=" ">-12.5,1.45
-6.5,3.5</gml:coordinates>
</gml:LineString>
</rivers_geom>
</rivers>
Is there something wrong with my request, or is update on geometries still
unsupported ?
Thanks for your help
Andreas
I thought we had implemented updates on geometries, but investigated and
found that we had not. I wasn't able to reproduce your error exactly, but
I spent this morning fixing the request code so that the Value would
actually get the geometry. GeoServer's filter handler was grabbing all
geometries, so they were never set as the value, they were just swallowed
up. The fix is now in cvs, and it should get your error too, let us know
if it doesn't. For more information on working from cvs check
http://sourceforge.net/cvs/?group_id=25086. If it's not a pressing need
you can also just wait for the next release. Thanks for catching the bug.
Chris
On Fri, 6 Jun 2003, Andreas von Doemming wrote:
Hi
Sending a update-request to GeoServer 0.96 works fine with non-geometry
attributes, but when I try to update the geometry I get an exception :-(.
Here is my request:
<wfs:Update typeName="rivers">
<wfs:Property>
<!-- this works
<wfs:Name>river_name</wfs:Name>
<wfs:Value>MyTestRiver</wfs:Value>
-->
<wfs:Name>rivers_geom</wfs:Name>
<wfs:Value> <!-- and this not
-->
<gml:LineString gid="rivers.19195.rivers_geom"
srsName="http://www.opengis.net/gml/srs/epsg.xml#31491">
<gml:coordinates>10.5,10.5 12.5,12.5</gml:coordinates>
</gml:LineString>
</wfs:Value>
</wfs:Property>
<ogc:Filter>
<ogc:FeatureId fid="rivers.19195"/>
</ogc:Filter>
</wfs:Update>
== The resulting exception: ==
java.lang.NullPointerException
at com.vividsolutions.jts.io.WKTWriter.writeFormatted(Unknown Source)
at com.vividsolutions.jts.io.WKTWriter.write(Unknown Source)
at
org.geotools.data.postgis.PostgisDataSource.makeModifySql(PostgisDataSource.java:1015)
at
org.geotools.data.postgis.PostgisDataSource.modifyFeatures(PostgisDataSource.java:930)
at org.vfny.geoserver.responses.TransactionResponse.doUpdate(Unknown
Source)[...]
btw, the Feature exists, getFeature returns:
<rivers fid="rivers.19195">
<river_name>myTestRiver</river_name>
<rivers_geom>
<gml:LineString gid="rivers.19195.rivers_geom"
srsName="http://www.opengis.net/gml/srs/epsg.xml#31491">
<gml:coordinates decimal="." cs="," ts=" ">-12.5,1.45
-6.5,3.5</gml:coordinates>
</gml:LineString>
</rivers_geom>
</rivers>
Is there something wrong with my request, or is update on geometries still
unsupported ?
Thanks for your help
Andreas
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
I retrieved new working version from
CVS, installed it and the update is working now.
thanks
Andreas