Feature input

All GeoAnalytics Tools have input parameters that take features as their input. Features can be input in one of the following ways:

  1. Specify a URL to a feature service layer (or a map service layer that has query as one of its capabilities) along with an optional filter.
  2. Specify a URL to a big data file share layer along with an optional filter.
  3. Specify a feature collection.

URL to a feature service

You can give the URL to a feature service layer or a map service layer that has query capability.

The URL syntax is:

1
2
3
4
5
{
"url": "<url to feature or map service layer>"
"serviceToken": "<token to allow access to feature service layer>"
"filter": "<attribute query string to select features to process>"
}

If your layer is on a secure server, you must provide a token that allows the analysis service to access your layer.

In addition to supplying the URL, you can supply a filter string using a SQL WHERE clause but without the WHERE statement, for example:

1
2
3
4
{
  "url": "https://services.arcgis.com/f126c8da131543019b05e4bfab6fc6ac/arcgis/rest/services/hospitals/FeatureServer/0",
  "filter": "STATE='CA'"
}

If no filter is supplied, all features will be analyzed.

URL to a big data catalog service

You can give the URL to a big data catalog service dataset. See Big Data Catalog Service for more information.

The URL syntax is:

1
2
3
4
5
{
  "url": "<url to bigDataFileShare dataset>"
  "serviceToken": "<token to allow access to bigDataFileShare dataset>"
  "filter": "<attribute query string to select features to process>"
}

If your layer is on a secure server, you must provide a token that allows the analysis service to access your layer.

In addition to supplying the URL, you can supply a filter string on an SQL WHERE clause but without the WHERE statement. For example, with a machine named mymachine on domain esri.com, a web adaptor named server, and a big data catalog service that is sourced from a big data file share (see Get started with big data file shares named fileShareName, you can access a dataset named Cities:

1
2
3
4
{
  "url": "https://mymachine.esri.com/server/rest/services/DataStoreCatalogs/bigDataFileShare_fileShareName/Cities",
  "filter": "STATE='CA' and POPULATION > 100000"
}

If no filter is supplied, all features will be analyzed.

Feature collection

The other option is to send a featureCollection instead of a layer. Filters are supported with feature collections. For more information on feature collections and feature sets, see the Javascript documentation for featureCollection and featureSet.

An example of a feature collection of points with an Id and Name attribute.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
    "layerDefinition": {
        "geometryType": "esriGeometryPoint",
        "fields": [
            {
                "name": "Id",
                "type": "esriFieldTypeOID",
                "alias": "Id"
            },
            {
                "name": "Name",
                "type": "esriFieldTypeString",
                "alias": "Name"
            }
        ]
    },
    "featureSet": {
        "geometryType": "esriGeometryPoint",
        "spatialReference": {
            "wkid": 4326
        },
        "features": [
            {
                "geometry": {
                    "x": -104.44,
                    "y": 34.83
                },
                "attributes": {
                    "Id": 43,
                    "Name": "Feature 1"
                }
            },
            {
                "geometry": {
                    "x": -100.65,
                    "y": 33.69
                },
                "attributes": {
                    "Id": 67,
                    "Name": "Feature 2"
                }
            }
        ]
    },
    "filter": "Name = 'Feature 1'"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close