Update element Request .1 Schema
OpenGIS
©
Specification OGC 04-094
Copyright © Open Geospatial Consortium, Inc 2005
69
case where the Filter element does not identify any feature instances to operate on, the update action will simply not have any effect. This is not an exception condition.
The full definition of the Filter element is described in the Filter Encoding Implementation Specification [3].
Example
The following example updates the population property of the feature identified by the feature identifier BuiltUpA_1M.1013.
?xml version=1.0 ? wfs:Transaction
version=1.1.0 service=WFS
xmlns=http:www.someserver.commyns xmlns:ogc=http:www.opengis.netogc
xmlns:wfs=http:www.opengis.netwfs xmlns:xsi=http:www.w3.org2001XMLSchema-instance
xsi:schemaLocation=http:www.opengis.netwfs ..wfs1.1.0WFS.xsd wfs:Update typeName=BuiltUpA_1M
wfs:Property wfs:Namepopulationwfs:Name
wfs:Value4070000wfs:Value wfs:Property
ogc:Filter ogc:GmlObjectId gml:id=BuiltUpA_1M.10131
ogc:Filter wfs:Update
wfs:Transaction
Example
Update the populationType property of an enumerated set of features. In this example, the features identified by feature identifiers:
BuiltUpA_1M.1013 BuiltUpA_1M.34
BuiltUpA_1M.24256
have their populationType attribute set to the value CITY.
?xml version=1.0 ? wfs:Transaction
version=1.1.0 service=WFS
xmlns=http:www.someserver.commyns xmlns:ogc=http:www.opengis.netogc
xmlns:wfs=http:www.opengis.netwfs xmlns:xsi=http:www.w3.org2001XMLSchema-instance
xsi:schemaLocation=http:www.opengis.netwfs ..wfs1.1.0WFS.xsd wfs:Update typeName=BuiltUpA_1M
wfs:Property wfs:NamepopulationTypewfs:Name
wfs:ValueCITYwfs:Value wfs:Property
ogc:Filter ogc:GmlObjectId gml:id=BuiltUpA_1M.1013
ogc:GmlObjectId gml:id=BuiltUpA_1M.34 ogc:GmlObjectId gml:id=BuiltUpA_1M.24256
ogc:Filter wfs:Update
OpenGIS
©
Specification OGC 04-094
Copyright © Open Geospatial Consortium, Inc 2005
70
wfs:Transaction
Example
Update the name property of an enumerated set of features, and update the FAC_ID property of another set of features defined by constraining the value of the tileId property
to values greater than 1000.
?xml version=1.0 ? wfs:Transaction
version=1.1.0 service=WFS
xmlns:myns=http:www.someserver.commyns xmlns:ogc=http:www.opengis.netogc
xmlns:wfs=http:www.opengis.netwfs xmlns:xsi=http:www.w3.org2001XMLSchema-instance
xsi:schemaLocation=http:www.opengis.netwfs ..wfs1.1.0WFS.xsd wfs:Update typeName=myns:BuiltUpA_1M
wfs:Property wfs:Namemyns:namewfs:Name
wfs:Valuesomestringwfs:Value wfs:Property
ogc:Filter ogc:GmlObjectId gml:id=BuiltUpA_1M.1013
ogc:GmlObjectId gml:id=BuiltUpA_1M.34 ogc:GmlObjectId gml:id=BuiltUpA_1M.24256
ogc:Filter wfs:Update
wfs:Update typeName=myns:BuiltUpA_1M wfs:Property
wfs:Namemyns:facIdwfs:Name wfs:Value100wfs:Value
wfs:Property ogc:Filter
ogc:PropertyIsGreaterThan ogc:PropertyNameBuiltUpA_1MtileIdogc:PropertyName
ogc:Literal1000ogc:Literal ogc:PropertyIsGreaterThan
ogc:Filter wfs:Update
wfs:Transaction
Example
This example updates two feature classes, OceansA_1M and TreesA_1MTreesA_1M. All features of OceansA_1M with a depth greater than 2400m are updated and feature
TreesA_1MTreesA_1M.1010 is also updated.
?xml version=1.0 ? wfs:Transaction
version=1.1.0 service=WFS
xmlns:ogc=http:www.opengis.netogc xmlns:wfs=http:www.opengis.netwfs
xmlns:myns=http:www.someserver.commyns xmlns:xsi=http:www.w3.org2001XMLSchema-instance
xsi:schemaLocation=http:www.opengis.netwfs ..wfs1.1.0WFS.xsd wfs:Update typeName=myns:OceansA_1M
wfs:Property wfs:Namemyns:depthwfs:Name
wfs:Value2400wfs:Value wfs:Property
ogc:Filter
OpenGIS
©
Specification OGC 04-094
Copyright © Open Geospatial Consortium, Inc 2005
71
ogc:PropertyIsGreaterThan ogc:PropertyNameOceansA_1M.depthogc:PropertyName
ogc:Literal2400ogc:Literal ogc:PropertyIsGreaterThan
ogc:Filter wfs:Update
wfs:Update typeName=myns:TreesA_1MTreesA_1M wfs:Property
wfs:Namemyns:treeTypewfs:Name wfs:ValueCONIFEROUSwfs:Value
wfs:Property ogc:Filter
ogc:GmlObjectId gml:id=TreesA_1MTreesA_1M.1010 ogc:Filter
wfs:Update wfs:Transaction