[OpenLayers-Users] Problems on update and show GeometryCollection.
lsm_tti
lsm_tti at iol.pt
Mon Sep 5 09:37:05 EDT 2011
I have a problem on update of GeonetryCollection and I could not update my
geometry through OpenLayers, and show the geomeryCollection with version of
gml3, only can show with gml2. I am using OpenLayers 2.11 and GeoServer
“geoserver-trunk-2011-09-05”. The geometry collection is stored in Oracle
10g.
The GeometryCollection I'm trying to edit is made up of lines and polygons.
When I making changes in geometry through OpenLayers, WFS transanction
generated is the following:
/<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wfs:Update typeName="feature:TESTE2_BEMPORTUARIO"
xmlns:feature="http://localhost:8070/geoserver">
<wfs:Property>
<wfs:Name>GEOMETRY</wfs:Name>
<wfs:Value>
<gml:GeometryCollection xmlns:gml="http://www.opengis.net/gml"
srsName="EPSG:27493">
<gml:geometryMember>
<gml:LineString srsName="EPSG:27493">
<gml:posList>-46991.12771677839 169596.48558836358
-46988.54482653 169450.97978503</gml:posList>
</gml:LineString>
</gml:geometryMember>
<gml:geometryMember>
<gml:LineString srsName="EPSG:27493">
<gml:posList>-47054.80276458 169342.31676662 -46922.36000708
169399.3200074</gml:posList>
</gml:LineString>
</gml:geometryMember>
<gml:geometryMember>
<gml:Polygon srsName="EPSG:27493">
<gml:exterior>
<gml:LinearRing>
<gml:posList>-47219.12245095 169315.8135914
-47121.06070263 169323.76454397 -47038.90085945 169360.86898928
-47049.50212954 169437.72819742 -47219.12245095 169315.8135914</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:geometryMember>
<gml:geometryMember>
<gml:Polygon srsName="EPSG:27493">
<gml:exterior>
<gml:LinearRing>
<gml:posList>-47174.06705308 169448.32946751
-47049.50212954 169485.43391282 -47052.15244706 169551.69185088
-47144.91356033 169567.59375601 -47174.06705308
169448.32946751</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:geometryMember>
</gml:GeometryCollection>
</wfs:Value>
</wfs:Property>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:FeatureId fid="TESTE2_BEMPORTUARIO.30519"/>
</ogc:Filter>
</wfs:Update>
</wfs:Transaction>/
But geoserver can´t update with the above WFS transaction, only updates with
this:
/<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wfs:Update typeName="feature:TESTE2_BEMPORTUARIO"
xmlns:feature="http://localhost:8070/geoserver">
<wfs:Property>
<wfs:Name>GEOMETRY</wfs:Name>
<wfs:Value>
<gml:MultiGeometry xmlns:gml="http://www.opengis.net/gml"
srsName="EPSG:27493">
<gml:geometryMember>
<gml:LineString srsName="EPSG:27493">
<gml:posList>-46991.12771677839 169596.48558836358
-46988.54482653 169450.97978503</gml:posList>
</gml:LineString>
</gml:geometryMember>
<gml:geometryMember>
<gml:LineString srsName="EPSG:27493">
<gml:posList>-47054.80276458 169342.31676662 -46922.36000708
169399.3200074</gml:posList>
</gml:LineString>
</gml:geometryMember>
<gml:geometryMember>
<gml:Polygon srsName="EPSG:27493">
<gml:exterior>
<gml:LinearRing>
<gml:posList>-47219.12245095 169315.8135914
-47121.06070263 169323.76454397 -47038.90085945 169360.86898928
-47049.50212954 169437.72819742 -47219.12245095 169315.8135914</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:geometryMember>
<gml:geometryMember>
<gml:Polygon srsName="EPSG:27493">
<gml:exterior>
<gml:LinearRing>
<gml:posList>-47174.06705308 169448.32946751
-47049.50212954 169485.43391282 -47052.15244706 169551.69185088
-47144.91356033 169567.59375601 -47174.06705308
169448.32946751</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:geometryMember>
</gml:MultiGeometry >
</wfs:Value>
</wfs:Property>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:FeatureId fid="TESTE2_BEMPORTUARIO.30519"/>
</ogc:Filter>
</wfs:Update>
</wfs:Transaction>/
WFS code when I try to show a geometryCollection (Multigeometry) on
Openlayers. This code is build by geoserver.
/<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection numberOfFeatures="0"
timeStamp="2011-09-05T14:08:21.187+01:00"
xsi:schemaLocation="http://localhost:8080/geoserver
http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=O3Port%3ATESTE2_BEMPORTUARIO
http://www.opengis.net/wfs
http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:tiger="http://www.census.gov"
xmlns:cite="http://www.opengeospatial.net/cite"
xmlns:nurc="http://www.nurc.nato.int" xmlns:sde="http://geoserver.sf.net"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:topp="http://www.openplans.org/topp"
xmlns:O3Port="http://localhost:8080/geoserver"
xmlns:it.geosolutions="http://www.geo-solutions.it"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sf="http://www.openplans.org/spearfish"
xmlns:ows="http://www.opengis.net/ows"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xlink="http://www.w3.org/1999/xlink">
<gml:featureMembers>
<O3Port:TESTE2_BEMPORTUARIO gml:id="TESTE2_BEMPORTUARIO.30519">
<O3Port:GEOMETRY>
<gml:MultiGeometry srsDimension="2"
srsName="http://www.opengis.net/gml/srs/epsg.xml#27493">
<gml:geometryMember>
<gml:LineString>
<gml:posList>-47103.3946020567 169627.5381311
-47053.0385691367 169484.4209849</gml:posList>
</gml:LineString>
</gml:geometryMember>
<gml:geometryMember>
<gml:LineString>
<gml:posList>-47119.2965071867 169375.75796649
-46986.8537496867 169432.76120727</gml:posList>
</gml:LineString>
</gml:geometryMember>
<gml:geometryMember>
<gml:Polygon>
<gml:exterior>
<gml:LinearRing>
<gml:posList>-47283.6161935567 169349.25479127
-47185.5544452367 169357.20574384 -47103.3946020567 169394.31018915
-47113.9958721467 169471.16939729 -47283.6161935567
169349.25479127</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:geometryMember>
<gml:geometryMember>
<gml:Polygon>
<gml:exterior>
<gml:LinearRing>
<gml:posList>-47238.5607956867 169481.77066738
-47113.9958721467 169518.87511269 -47116.6461896667 169585.13305075
-47209.4073029367 169601.03495588 -47238.5607956867
169481.77066738</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:geometryMember>
</gml:MultiGeometry>
</O3Port:GEOMETRY>
</O3Port:TESTE2_BEMPORTUARIO>
</gml:featureMembers>
</wfs:FeatureCollection>/
Declaration of vector Layer:
/ var teste3BaseWFS = new OpenLayers.Layer.Vector("TESTE3", {
strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
protocol: new OpenLayers.Protocol.WFS({
version: "1.0.0",
srsName: "EPSG:27493",
url: "http://localhost:8080/geoserver/wfs",
featureNS : "http://localhost:8080/geoserver",
featureType: "TESTE2_BEMPORTUARIO",
outputFormat: "GML2",
geometryName: "GEOMETRY"
})
});/
My question is, if exists a bug on the parser, a problem on the way as the
vector layer is being declared our other thing.
Thanks in advanced, LSM
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Problems-on-update-and-show-GeometryCollection-tp6760836p6760836.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list