updateFeatures
Description
Updates features in a table by passing in a feature collection with an optional commitInterval. Each feature in the collection must have an ID (primary key) which is used to match the input feature with the feature in the table. The response contains the number of features that were successfully updated. A typical workflow is to generate the feature collection using a listFeatures or search operation, modify the feature collection, then pass the modified feature collection into the updateFeatures operation.
ACL Authorization Flow
To update features in a named table by passing in a feature collection with an optional commit interval, the user (or the role they belong to) needs both EXECUTE and MODIFY permission on the Named table.
Messages
The following table lists the request and response messages for the updateFeatures operation.
Click on a message name to get more information about the message.
Message | Description |
---|---|
UpdateFeaturesRequest | The request message for the updateFeatures operation. |
UpdateFeaturesResponse | The response message for the updateFeatures operation. |
Example
Example for updating features in a table. The AttributeDefinitionList defines the columns of the table, and the FeatureList defines the values to be updated:
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.mapinfo.com/midev/service/feature/v1" xmlns:ns3="http://www.mapinfo.com/midev/service/featurecollection/v1" xmlns:ns4=http://www.mapinfo.com/midev/service/geometries/v1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<S:Header/>
<S:Body>
<UpdateFeaturesRequest table="/MyTable" commitInterval="1">
<ns3:FeatureCollection>
<ns3:FeatureCollectionMetadata>
<ns3:AttributeDefinitionList>
<ns3:AttributeDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns3:ScalarAttributeDefinition" dataType="Double" name="Column1"/>
<ns3:AttributeDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns3:GeometryAttributeDefinition" srsName="epsg:4267" dataType="Geometry" name="SP_GEOMETRY"/>
</ns3:AttributeDefinitionList>
</ns3:FeatureCollectionMetadata>
<ns3:FeatureList>
<ns3:Feature id="1">
<ns3:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns3:DoubleValue">
<ns3:Value>123.456</ns3:Value>
</ns3:AttributeValue>
<ns3:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns3:GeometryValue">
<ns4:FeatureGeometry xsi:type="ns4:Point" srsName="epsg:4326">
<ns4:Pos>
<ns4:X>-72</ns4:X>
<ns4:Y>42</ns4:Y>
</ns4:Pos>
</ns4:FeatureGeometry>
</ns3:AttributeValue>
</ns3:Feature>
</ns3:FeatureList>
</ns3:FeatureCollection>
</UpdateFeaturesRequest>
</S:Body>
</S:Envelope>