A derive analysis resulting in a new layer with parks within 150 meters from a bike route.
What is a derive new locations analysis?
A derive new location analysis is the process of selecting and, potentially, modifying features that satisfy one or more SQL and/or spatial expressions. To execute the analysis, use the spatial analysis service and the DeriveNewLocations operation.
A derive new location analysis is similar to the Find location analysis. For example, if you perform a SQL query using where, or the spatial expressions completely within or completey contains, the results between the two analyses will be the same. However, if you use a derive analysis with a spatial expression such as intersects or within a distance of, the results can contain features with new geometries. This analysis is often used for site selection.
Real-world examples of this analysis include the following:
Determining the portions of areas that are suitable for wildlife habitats.
Evaluating the suitability for real estate developments for site selection.
Finding areas closest to places of interest (POIs).
How to derive new locations
The general steps to performing a derive new locations analysis are as follows:
Review the parameters for the DeriveNewLocations operation.
Determine if you would like the results as a feature collection (dynamic) or hosted feature layer (stored).
Send a request to get the spatial analysis service URL.
Execute a job request with the following URL and parameters:
A string representing the name of the hosted feature layer to return with the results. NOTE: If you do not include this parameter, the results are returned as a feature collection (JSON).
{"serviceProperties": {"name": "<SERVICE_NAME>"}}
context
A bounding box or output spatial reference for the analysis.
"extent":{"xmin:", "ymin:", "xmax:", "ymax:"}
Code examples
Find neighborhoods sections near police stations
This example uses the DeriveNewLocations operation to construct a spatial query to return the sections of San Francisco Neighborhoods that are within half a mile from a police station. While the results of the analysis return partial features that match the spatial query, the new features still contain the attribute information from the originally hosted feature layer.
For the analysis, the inputLayers value is the Police stations and neighborhoods hosted feature layers. The expression value used is: SF Neighborhoods within a distance of 0.5 Miles from Police Stations.
Portions of San Francisco neighborhoods within .25 miles of police stations.
APIs
ArcGIS API for PythonArcGIS API for PythonArcGIS REST JS
Find light rail lines that intersect neighborhoods
This example uses the DeriveNewLocations operation to construct a spatial query that returns only the sections of light rail lines that intersect Downtown Portland.
For the analysis, the inputLayers are the Light rail lines and Portland neighborhoods hosted feature layers. The expression used is: Light rail lines intersects Portland neighborhoods.
Portions of rail lines that intersect the Downtownowntown neighborhood of Portland.
APIs
ArcGIS API for PythonArcGIS API for PythonArcGIS REST JS
Learn how to perform related analyses interactively with Map Viewer and programmatically with ArcGIS API for Python, ArcGIS REST JS, and ArcGIS REST API.