B U S I N E S S A N A L Y S T 10.2 R E S T R E P O S I T O R Y U T I L I T Y
Add Features Endpoint
Adds features to a repository feature layer.
Availability: Business Analyst Server.
http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/AddFeatures/execute
Parameters
SourceLayer (required) |
Source data layer to get features from. The SourceLayer layer should be specified by the RecordSet or Item or Points property value. Type PointLayer. |
DestinationItem (required) |
Folder item containing a feature layer to be updated. Type esriFolderItem. |
f (optional) |
Response format. Type string. Available formats: HTML, JSON, PJSON, XML. Default: HTML. |
IsFullErrorMessage (optional) |
Mode for composing error messages. Type boolean. Default: false. |
token |
Authentication token. This parameter is required if your Business Analyst Server is secured. Type string. |
Returns
Variable of type boolean whose value is always true.
Remarks
This method allows user to add features to a feature layer having a point or polygon geometry. The SourceLayer and DestinationItem layers should have the same type of geometry and the same spatial reference.
While adding features to the destination layer, alien attributes of features are ignored. If the destination layer contains attributes that are missing in the source layer, its values for added features are initialized to default values.
When added to the destination layer, features of the source layer receive serial values for the Object ID attribute starting after the last feature Object ID in the destination layer. Because the Object ID attribute value is automatically assigned to new features of the destination layer, you do not need to specify the Object ID attribute for features of the source feature layer. If this attribute is specified, it is ignored.
Example Usage
The example below illustrates a workflow consisting of uploading a custom trade area layer to Business Analyst Server Repository with the Upload Feature Set endpoint, adding features with this endpoint, and retrieving the modified layer with the Open Feature Layer endpoint. The retrieved feature layer is shown here in the case of a shapefile-based repository.
NOTE: The name of the Object ID attribute of features depends on a feature class workspace type used. Typical names for Object ID are "FID", "OID", or "OBJECTID".
{ "results": [ { "paramName":"OutputFeatureClass", "dataType":"GPFeatureRecordSetLayer", "value": { "geometryType":"esriGeometryPolygon", "spatialReference": { "wkid":4326 }, "fieldAliases": { "OBJECTID":"Object ID", "AREA_DESC":"AREA_DESC", "AREA_ID":"AREA_ID", "RING":"RING", "RING_DEFN":"RING_DEFN", "STORE_ID":"STORE_ID", "Shape.area":"Shape.area", "Shape.len":"Shape.len" }, "fields": [ { "name":"OBJECTID", "type":"esriFieldTypeOID", "alias":"Object ID" }, ... { "name":"Shape.len", "type":"esriFieldTypeDouble", "alias":"Shape.len" } ], "features": [ { "geometry": { "rings": [ [ [ -122.4346, 37.856648 ], ... [ -122.4346, 37.856648 ] ] ], "spatialReference": { "wkid":4326 } }, "attributes": { "OBJECTID":1, "AREA_DESC":"0 - 5 Miles", "AREA_ID":"1_1", "RING":1, "RING_DEFN":"5", "STORE_ID":"1", "Shape.area":0.0180196727515, "Shape.len":0.49830034470522 } }, ... { "geometry": { "rings": [ [ [ -122.2329, 38.005748 ], ... [ -122.2329, 38.005748 ] ] ], "spatialReference": { "wkid":4326 } }, "attributes": { "OBJECTID":4, "AREA_DESC":"additional 2", "AREA_ID":"4_1", "RING":1, "RING_DEFN":"7", "STORE_ID":"2", "Shape.area":0.0180074758195, "Shape.len":0.498103034899043 } } ] } } ], "messages": [ ] }
NOTE: The response has been abbreviated where "..." is noted.
See Also