arcgis.features.analysis module

All the spatial analysis tools from the analyze_patterns, enrich_data, find_locations, manage_data, summarize_data and use_proximity submodules, in one place for convenience.

aggregate_points

analysis.aggregate_points(point_layer, polygon_layer, keep_boundaries_with_no_points=True, summary_fields=[], group_by_field=None, minority_majority=False, percent_points=False, output_name=None, context=None, gis=None)

Aggregate points task allows you to aggregate or count the total number of points that are distributed within specified areas or boundaries (polygons). You can also summarize Sum, Mean, Min, Max and Standard deviation calculations for attributes of the point layer to understand the general characteristics of aggregated points.

point_layer : Required layer (see Feature Input in documentation)
Point layer to be aggregated
polygon_layer : Required layer (see Feature Input in documentation)
Polygon layer to which the points should be aggregated.
keep_boundaries_with_no_points : Optional bool
Specify whether the polygons without any points should be returned in the output.
summary_fields : Optional list of strings
A list of field names and summary type. Example [fieldName1 summaryType1,fieldName2 summaryType2].
group_by_field : Optional string
A field name from PointLayer based on which the points will be grouped.
minority_majority : Optional bool
This boolean parameter is applicable only when a groupByField is specified. If true, the minority (least dominant) or the majority (most dominant) attribute values within each group, within each boundary will be calculated.
percent_points : Optional bool
This boolean parameter is applicable only when a groupByField is specified. If set to true, the percentage count of points for each unique groupByField value is calculated.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.
dict with the following keys:
“aggregated_layer” : layer (FeatureCollection) “group_summary” : layer (FeatureCollection)

calculate_density

analysis.calculate_density(input_layer, field=None, cell_size=None, cell_size_units='Meters', radius=None, radius_units=None, bounding_polygon_layer=None, area_units=None, classification_type='EqualInterval', num_classes=10, output_name=None, context=None, gis=None)

The calculate_density function creates a density map from point or line features by spreading known quantities of some phenomenon (represented as attributes of the points or lines) across the map. The result is a layer of areas classified from least dense to most dense.

input_layer : Required layer (see Feature Input in documentation)
The point or line features from which to calculate density.
field : Optional string
A numeric field name specifying the number of incidents at each location. If not specified, each location will be assumed to represent a single count.
cell_size : Optional float
This value is used to create a mesh of points where density values are calculated. The default is approximately 1/1000th of the smaller of the width and height of the analysis extent as defined in the context parameter.
cell_size_units : Optional string
The units of the cellSize value
radius : Optional float
A distance specifying how far to search to find point or line features when calculating density values.
radius_units : Optional string
The units of the radius parameter.
bounding_polygon_layer : Optional layer (see Feature Input in documentation)
A layer specifying the polygon(s) where you want densities to be calculated.
area_units : Optional string
The units of the calculated density values.
classification_type : Optional string
Determines how density values will be classified into polygons.
num_classes : Optional int
This value is used to divide the range of predicted values into distinct classes. The range of values in each class is determined by the classificationType parameter.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.

result_layer : layer (FeatureCollection)

connect_origins_to_destinations

analysis.connect_origins_to_destinations(origins_layer, destinations_layer, measurement_type='DrivingTime', origins_layer_route_id_field=None, destinations_layer_route_id_field=None, time_of_day=None, time_zone_for_time_of_day='GeoLocal', output_name=None, context=None, gis=None)

Calculates routes between pairs of points.

origins_layer : Required layer (see Feature Input in documentation)
The routes start from points in the origins layer.
destinations_layer : Required layer (see Feature Input in documentation)
The routes end at points in the destinations layer.
measurement_type : Required string
The routes can be determined by measuring travel distance or travel time along street network using different travel modes or by measuring straight line distance.
origins_layer_route_id_field : Optional string
The field in the origins layer containing the IDs that are used to match an origin with a destination.
destinations_layer_route_id_field : Optional string
The field in the destinations layer containing the IDs that are used to match an origin with a destination.
time_of_day : Optional datetime.datetime
When measurementType is DrivingTime, this value specifies the time of day to be used for driving time calculations based on traffic. WalkingTime and TruckingTime measurementType do not support calculations based on traffic.
time_zone_for_time_of_day : Optional string
Determines if the value specified for timeOfDay is specified in UTC or in a time zone that is local to the location of the origins.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.
dict with the following keys:
“routes_layer” : layer (FeatureCollection) “unassigned_origins_layer” : layer (FeatureCollection) “unassigned_destinations_layer” : layer (FeatureCollection)

create_buffers

analysis.create_buffers(input_layer, distances=[], field=None, units='Meters', dissolve_type='None', ring_type='Disks', side_type='Full', end_type='Round', output_name=None, context=None, gis=None)

Creates buffer polygon(s) around input features.

input_layer : Required layer (see Feature Input in documentation)
The input to be buffered.
distances : Optional list of floats
The distance(s) that will be buffered.
field : Optional string
Buffers will be created using field values.
units : Optional string
The linear unit to be used with the distance value(s).
dissolve_type : Optional string
Specifies the dissolve to be performed to remove buffer overlap.
ring_type : Optional string
The ring type.
side_type : Optional string
The side(s) of the input that will be buffered.
end_type : Optional string
The shape of the buffer at the end of buffered line features.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.

buffer_layer : layer (FeatureCollection)

create_drive_time_areas

analysis.create_drive_time_areas(input_layer, break_values=[5, 10, 15], break_units='Minutes', travel_mode='Driving', overlap_policy='Overlap', time_of_day=None, time_zone_for_time_of_day='GeoLocal', output_name=None, context=None, gis=None)

input_layer : Required layer (see Feature Input in documentation)

break_values : Optional list of floats

break_units : Optional string

travel_mode : Optional string

overlap_policy : Optional string

time_of_day : Optional datetime.datetime

time_zone_for_time_of_day : Optional string

output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.

drive_time_areas_layer : layer (FeatureCollection)

create_route_layers

analysis.create_route_layers(route_data_item, delete_route_data_item=False, tags=None, summary=None, route_name_prefix=None, folder_name=None, gis=None)

Creates route layer items on the portal from the input route data.

route_data_item : Required item
The route data item that is used to create route layer items.
delete_route_data_item : Required Boolean (see Feature Input in documentation)
Indicates if the input route data item should be deleted. The default value is False which does not delete the route data item.
tags: Optional string
Tags used to describe and identify the route layer items. Individual tags are separated using a comma. The route name is always added as a tag even when a value for this argument is not specified.
summary: Optional string
The summary displayed as part of the item information for the route layer item. If a value for this argument is not specified, a default summary text “Route and directions for <Route Name>” is used.
route_name_prefix : Optional string
A qualifier added to the title of every route layer item. This can be used to designate all routes that are shared for a specific purpose to have the same prefix in the title. The name of the route is always appended after this qualifier. If a value for the route_name_prefix is not specified, the title for the route layer item is created using only the route name.
folder_name: Optional string
The folder within your personal online workspace (My Content in your ArcGIS Online or Portal for ArcGIS organization) where the route layer items will be created. If a folder with the specified name does not exist, a new folder will be created. If a folder with the specified name exists, the items will be created in the existing folder. If a value for folder_name is not specified, the route layer items are created in the root folder of your online workspace.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.

route_layers : list (items)

create_viewshed

analysis.create_viewshed(input_layer, dem_resolution='Finest', maximum_distance=None, max_distance_units='Meters', observer_height=None, observer_height_units='Meters', target_height=None, target_height_units='Meters', generalize=True, output_name=None, context=None, gis=None)

Creates areas that are visible based on locations you specify.

input_layer : Required layer (see Feature Input in documentation)

dem_resolution : Optional string

maximum_distance : Optional float

max_distance_units : Optional string

observer_height : Optional float

observer_height_units : Optional string

target_height : Optional float

target_height_units : Optional string

generalize : Optional bool

output_name : Optional string

context : Optional string

gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.

viewshed_layer : layer (FeatureCollection)

create_watersheds

analysis.create_watersheds(input_layer, search_distance=None, search_units='Meters', source_database='FINEST', generalize=True, output_name=None, context=None, gis=None)

Creates catchment areas based on locations you specify.

input_layer : Required layer (see Feature Input in documentation)

search_distance : Optional float

search_units : Optional string

source_database : Optional string

generalize : Optional bool

output_name : Optional string

context : Optional string

gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.
dict with the following keys:
“snap_pour_pts_layer” : layer (FeatureCollection) “watershed_layer” : layer (FeatureCollection)

derive_new_locations

analysis.derive_new_locations(input_layers=[], expressions=[], output_name=None, context=None, gis=None)

The Derive New Locations task derives new features from the input layers that meet a query you specify. A query is made up of one or more expressions. There are two types of expressions: attribute and spatial. An example of an attribute expression is that a parcel must be vacant, which is an attribute of the Parcels layer (where STATUS = ‘VACANT’). An example of a spatial expression is that the parcel must also be within a certain distance of a river (Parcels within a distance of 0.75 Miles from Rivers).The Derive New Locations task is very similar to the Find Existing Locations task, the main difference is that the result of Derive New Locations can contain partial features.In both tasks, the attribute expression where and the spatial relationships within and contains return the same result. This is because these relationships return entire features.When intersects or withinDistance is used, Derive New Locations creates new features in the result. For example, when intersecting a parcel feature and a flood zone area that partially overlap each other, Find Existing Locations will return the entire parcel whereas Derive New Locations will return just the portion of the parcel that is within the flood zone.

input_layers : Required list of strings
A list of layers that will be used in the expressions parameter.
expressions : Required string
Specify a list of expressions. Please refer documentation at http://developers.arcgis.com for more information on expressions.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.

result_layer : layer (FeatureCollection)

dissolve_boundaries

analysis.dissolve_boundaries(input_layer, dissolve_fields=[], summary_fields=[], output_name=None, context=None, gis=None)

Dissolve features based on specified fields.

input_layer : Required layer (see Feature Input in documentation)
The layer containing polygon features that will be dissolved.
dissolve_fields : Optional list of strings
One or more fields from the input that control which polygons are merged. If no fields are supplied, all polygons that overlap or shared a common border will be dissolved into one polygon.
summary_fields : Optional list of strings
A list of field names and statistical types that will be used to summarize the output. Supported statistics include: Sum, Mean, Min, Max, and Stddev.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.

dissolved_layer : layer (FeatureCollection)

enrich_layer

analysis.enrich_layer(input_layer, data_collections=[], analysis_variables=[], country=None, buffer_type=None, distance=None, units=None, output_name=None, context=None, gis=None)

The enrich_layer function enriches your data by getting facts about the people, places, and businesses that surround your data locations. For example: What kind of people live here? What do people like to do in this area? What are their habits and lifestyles? What kind of businesses are there in this area?The result will be a new layer of input features that includes all demographic and geographic information from given data collections.

input_layer : Required layer (see Feature Input in documentation)
Feature layer to enrich with new data
data_collections : Optional list of strings
Data collections you wish to add to your features.
analysis_variables : Optional list of strings
A subset of specific variables instead of dataCollections.
country : Optional string
The two character country code that specifies the country of the input features. Eg. US (United States), FR (France), GB (United Kingdom) etc.
buffer_type : Optional string
Area to be created around the point or line features for enrichment. Default is 1 Mile straight-line buffer radius.
distance : Optional float
A double value that defines the straight-line distance or time (when drivingTime is used).
units : Optional string
The unit (eg. Miles, Minutes) to be used with the distance value(s) specified in the distance parameter to calculate the area.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.

enriched_layer : layer (FeatureCollection)

extract_data

analysis.extract_data(input_layers, extent=None, clip=False, data_format=None, output_name=None, context=None, gis=None)

Select and download data for a specified area of interest. Layers that you select will be added to a zip file or layer package.

input_layers : Required list of strings
The layers from which you can extract features.
extent : Optional string
The area that defines which features will be included in the output zip file or layer package.
clip : Optional bool
Select features that intersect the extent or clip features within the extent.
data_format : Optional string
Format of the data that will be extracted and downloaded. Layer packages will always include file geodatabases.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.

content_id : layer (FeatureCollection)

find_existing_locations

analysis.find_existing_locations(input_layers=[], expressions=[], output_name=None, context=None, gis=None)

The Find Existing Locations task selects features in the input layer that meet a query you specify. A query is made up of one or more expressions. There are two types of expressions: attribute and spatial. An example of an attribute expression is that a parcel must be vacant, which is an attribute of the Parcels layer (where STATUS = ‘VACANT’). An example of a spatial expression is that the parcel must also be within a certain distance of a river (Parcels within a distance of 0.75 Miles from Rivers).

input_layers : Required list of strings
A list of layers that will be used in the expressions parameter.
expressions : Required string
Specify a list of expressions. Please refer documentation at http://developers.arcgis.com for more information on creating expressions.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.

result_layer : layer (FeatureCollection)

find_hot_spots

analysis.find_hot_spots(analysis_layer, analysis_field=None, divided_by_field=None, bounding_polygon_layer=None, aggregation_polygon_layer=None, output_name=None, context=None, gis=None)

The Find Hot Spots function finds statistically significant clusters of incident points, weighted points, or weighted polygons. For incident data, the analysis field (weight) is obtained by aggregation. Output is a hot spot map.

gis : The GIS used for running this analysis analysis_layer : Required layer (see Feature Input in documentation)

The point or polygon feature layer for which hot spots will be calculated.
analysis_field : Optional string
The numeric field in the AnalysisLayer that will be analyzed.

divided_by_field : Optional string

bounding_polygon_layer : Optional layer (see Feature Input in documentation)
When the analysis layer is points and no AnalysisField is specified, you can provide polygons features that define where incidents could have occurred.
aggregation_polygon_layer : Optional layer (see Feature Input in documentation)
When the AnalysisLayer contains points and no AnalysisField is specified, you can provide polygon features into which the points will be aggregated and analyzed, such as administrative units.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.
dict with the following keys:
“hot_spots_result_layer” : layer (FeatureCollection) “process_info” : list of messages

find_nearest

analysis.find_nearest(analysis_layer, near_layer, measurement_type='StraightLine', max_count=100, search_cutoff=2147483647, search_cutoff_units=None, time_of_day=None, time_zone_for_time_of_day='GeoLocal', output_name=None, context=None, gis=None)

Measures the straight-line distance, driving distance, or driving time from features in the analysis layer to features in the near layer, and copies the nearest features in the near layer to a new layer. Returns a layer containing the nearest features and a line layer that links the start locations to their nearest locations.

analysis_layer : Required layer (see Feature Input in documentation)
For each feature in this layer, the task finds the nearest features from the nearLayer.
near_layer : Required layer (see Feature Input in documentation)
The features from which the nearest locations are found.
measurement_type : Required string
The nearest locations can be determined by measuring straight-line distance, driving distance, or driving time
max_count : Optional int
The maximum number of near locations to find for each feature in analysisLayer.
search_cutoff : Optional float
Limits the search range to this value
search_cutoff_units : Optional string
The units for the value specified as searchCutoff
time_of_day : Optional datetime.datetime
When measurementType is DrivingTime, this value specifies the time of day to be used for driving time calculations based on traffic.

time_zone_for_time_of_day : Optional string

output_name : Optional string
Additional properties such as output feature service name
context : Optional string
Additional settings such as processing extent and output spatial reference
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.
dict with the following keys:
“nearest_layer” : layer (FeatureCollection) “connecting_lines_layer” : layer (FeatureCollection)

find_similar_locations

analysis.find_similar_locations(input_layer, search_layer, analysis_fields=[], input_query=None, number_of_results=0, output_name=None, context=None, gis=None)

Finds the locations that are most similar to one or more reference locations based on criteria that you specify.

input_layer : Required layer (see Feature Input in documentation)

search_layer : Required layer (see Feature Input in documentation)

analysis_fields : Required list of strings

input_query : Optional string

number_of_results : Optional int

output_name : Optional string

context : Optional string

dict with the following keys:
“similar_result_layer” : layer (FeatureCollection) “process_info” : layer (FeatureCollection)

interpolate_points

analysis.interpolate_points(input_layer, field, interpolate_option='5', output_prediction_error=False, classification_type='GeometricInterval', num_classes=10, class_breaks=[], bounding_polygon_layer=None, predict_at_point_layer=None, output_name=None, context=None, gis=None)

The Interpolate Points function allows you to predict values at new locations based on measurements from a collection of points. The function takes point data with values at each point and returns areas classified by predicted values.

input_layer : Required layer (see Feature Input in documentation)
The point layer whose features will be interpolated.
field : Required string
Name of the numeric field containing the values you wish to interpolate.
interpolate_option : Optional string
Integer value declaring your preference for speed versus accuracy, from 1 (fastest) to 9 (most accurate). More accurate predictions take longer to calculate.
output_prediction_error : Optional bool
If True, a polygon layer of standard errors for the interpolation predictions will be returned in the predictionError output parameter.
classification_type : Optional string
Determines how predicted values will be classified into areas.
num_classes : Optional int
This value is used to divide the range of interpolated values into distinct classes. The range of values in each class is determined by the classificationType parameter. Each class defines the boundaries of the result polygons.
class_breaks : Optional list of floats
If classificationType is Manual, supply desired class break values separated by spaces. These values define the upper limit of each class, so the number of classes will equal the number of entered values. Areas will not be created for any locations with predicted values above the largest entered break value. You must enter at least two values and no more than 32.
bounding_polygon_layer : Optional layer (see Feature Input in documentation)
A layer specifying the polygon(s) where you want values to be interpolated.
predict_at_point_layer : Optional layer (see Feature Input in documentation)
An optional layer specifying point locations to calculate prediction values. This allows you to make predictions at specific locations of interest.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.
dict with the following keys:
“result_layer” : layer (FeatureCollection) “prediction_error” : layer (FeatureCollection) “predicted_point_layer” : layer (FeatureCollection)

join_features

analysis.join_features(target_layer, join_layer, spatial_relationship=None, spatial_relationship_distance=None, spatial_relationship_distance_units=None, attribute_relationship=None, join_operation='JoinOneToOne', summary_fields=None, output_name=None, context=None, gis=None)

Parameters:

target_layer: targetLayer (str). Required parameter.

join_layer: joinLayer (str). Required parameter.

spatial_relationship: spatialRelationship (str). Optional parameter.
Choice list:[‘intersects’, ‘withindistance’, ‘completelycontains’, ‘completelywithin’, ‘within’, ‘contains’, ‘identicalto’]

spatial_relationship_distance: spatialRelationshipDistance (float). Optional parameter.

spatial_relationship_distance_units: spatialRelationshipDistanceUnits (str). Optional parameter.
Choice list:[‘Meters’, ‘Kilometers’, ‘Feet’, ‘Yards’, ‘Miles’, ‘NauticalMiles’]

attribute_relationship: attributeRelationship (str). Optional parameter.

join_operation: joinOperation (str). Optional parameter.
Choice list:[‘JoinOneToOne’, ‘JoinOneToMany’]

summary_fields: summaryFields (str). Optional parameter.

output_name: outputName (str). Optional parameter.

context: context (str). Optional parameter.

gis: Optional, the GIS on which this tool runs. If not specified, the active GIS is used.
Returns:
output_layer - outputLayer as a str

See http://localhost:6080/arcgis/rest/directories/arcgisoutput/tasks_GPServer/tasks/JoinFeatures.htm for additional help.

merge_layers

analysis.merge_layers(input_layer, merge_layer, merging_attributes=[], output_name=None, context=None, gis=None)

Combines two inputs of the same feature data type into a new output.

input_layer : Required layer (see Feature Input in documentation)
The point, line, or polygon features to merge with the mergeLayer.
merge_layer : Required layer (see Feature Input in documentation)
The point, line or polygon features to merge with inputLayer. mergeLayer must contain the same feature type point, line, or polygon) as the inputLayer.
merging_attributes : Optional list of strings
An array of values that describe how fields from the mergeLayer are to be modified. By default all fields from both inputs will be carried across to the output.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.

merged_layer : layer (FeatureCollection)

overlay_layers

analysis.overlay_layers(input_layer, overlay_layer, overlay_type='Intersect', snap_to_input=False, output_type='Input', tolerance=None, output_name=None, context=None, gis=None)

Overlays the input layer with the overlay layer. Overlay operations supported are Intersect, Union, and Erase.

input_layer : Required layer (see Feature Input in documentation)
The input analysis layer.
overlay_layer : Required layer (see Feature Input in documentation)
The layer to be overlaid with the analysis layer.
overlay_type : Optional string
The overlay type (INTERSECT, UNION, or ERASE) defines how the analysis layer and the overlay layer are combined.
snap_to_input : Optional bool
When the distance between features is less than the tolerance, the features in the overlay layer will snap to the features in the input layer.
output_type : Optional string
The type of intersection (INPUT, LINE, POINT).
tolerance : Optional float
The minimum distance separating all feature coordinates (nodes and vertices) as well as the distance a coordinate can move in X or Y (or both).
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.

output_layer : layer (FeatureCollection)

plan_routes

analysis.plan_routes(stops_layer, route_count, max_stops_per_route, route_start_time, start_layer, start_layer_route_id_field=None, return_to_start=True, end_layer=None, end_layer_route_id_field=None, travel_mode='Driving', stop_service_time=0, max_route_time=525600, output_name=None, context=None, gis=None)

You provide a set of stops and the number of vehicles available to visit the stops, and Plan Routes determines how to efficiently assign the stops to the vehicles and route the vehicles to the stops.

Use this tool to plan work for a mobile team of inspectors, appraisers, in-home support service providers, and others; deliver or pick up items from remote locations; or offer transportation services to people.

stops_layer : Required layer (see Feature Input in documentation)

route_count : Required int

max_stops_per_route : Required int

route_start_time : Required datetime.datetime

start_layer : Required layer (see Feature Input in documentation)

start_layer_route_id_field : Optional string

return_to_start : Optional bool

end_layer : Optional layer (see Feature Input in documentation)

end_layer_route_id_field : Optional string

travel_mode : Optional string

stop_service_time : Optional float

max_route_time : Optional float

output_name : Optional string

context : Optional string

gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.
dict with the following keys:
“routes_layer” : layer (FeatureCollection) “assigned_stops_layer” : layer (FeatureCollection) “unassigned_stops_layer” : layer (FeatureCollection)

summarize_nearby

analysis.summarize_nearby(sum_nearby_layer, summary_layer, near_type='StraightLine', distances=[], units='Meters', time_of_day=None, time_zone_for_time_of_day='GeoLocal', return_boundaries=True, sum_shape=True, shape_units=None, summary_fields=[], group_by_field=None, minority_majority=False, percent_shape=False, output_name=None, context=None, gis=None)

The SummarizeNearby task finds features that are within a specified distance of features in the input layer. Distance can be measured as a straight-line distance, a drive-time distance (for example, within 10 minutes), or a drive distance (within 5 kilometers). Statistics are then calculated for the nearby features. For example:Calculate the total population within five minutes of driving time of a proposed new store location.Calculate the number of freeway access ramps within a one-mile driving distance of a proposed new store location to use as a measure of store accessibility.

sum_nearby_layer : Required layer (see Feature Input in documentation)
Point, line, or polygon features from which distances will be measured to features in the summarizeLayer.
summary_layer : Required layer (see Feature Input in documentation)
Point, line, or polygon features. Features in this layer that are within the specified distance to features in the sumNearbyLayer will be summarized.
near_type : Optional string
Defines what kind of distance measurement you want to use to create areas around the nearbyLayer features.
distances : Required list of floats
An array of double values that defines the search distance for creating areas mentioned above
units : Optional string
The linear unit for distances parameter above. Eg. Miles, Kilometers, Minutes Seconds etc
time_of_day : Optional datetime.datetime
For timeOfDay, set the time and day according to the number of milliseconds elapsed since the Unix epoc (January 1, 1970 UTC). When specified and if relevant for the nearType parameter, the traffic conditions during the time of the day will be considered.
time_zone_for_time_of_day : Optional string
Determines if the value specified for timeOfDay is specified in UTC or in a time zone that is local to the location of the origins.
return_boundaries : Optional bool
If true, will return a result layer of areas that contain the requested summary information. The resulting areas are defined by the specified nearType. For example, if using a StraightLine of 5 miles, your result will contain areas with a 5 mile radius around the input features and specified summary information.If false, the resulting layer will return the same features as the input analysis layer with requested summary information.
sum_shape : Optional bool
A boolean value that instructs the task to calculate count of points, length of lines or areas of polygons of the summaryLayer within each polygon in sumWithinLayer.
shape_units : Optional string
Specify units to summarize the length or areas when sumShape is set to true. Units is not required to summarize points.
summary_fields : Optional list of strings
A list of field names and statistical summary type that you wish to calculate for all features in the summaryLayer that are within each polygon in the sumWithinLayer . Eg: [“fieldname1 summary”, “fieldname2 summary”]
group_by_field : Optional string
Specify a field from the summaryLayer features to calculate statistics separately for each unique value of the field.
minority_majority : Optional bool
This boolean parameter is applicable only when a groupByField is specified. If true, the minority (least dominant) or the majority (most dominant) attribute values within each group, within each boundary will be calculated.
percent_shape : Optional bool
This boolean parameter is applicable only when a groupByField is specified. If set to true, the percentage of shape (eg. length for lines) for each unique groupByField value is calculated.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.
dict with the following keys:
“result_layer” : layer (FeatureCollection) “group_by_summary” : layer (FeatureCollection)

summarize_within

analysis.summarize_within(sum_within_layer, summary_layer, sum_shape=True, shape_units=None, summary_fields=[], group_by_field=None, minority_majority=False, percent_shape=False, output_name=None, context=None, gis=None)

The SummarizeWithin task helps you to summarize and find statistics on the point, line, or polygon features (or portions of these features) that are within the boundaries of polygons in another layer. For example:Given a layer of watershed boundaries and a layer of land-use boundaries by land-use type, calculate total acreage of land-use type for each watershed.Given a layer of parcels in a county and a layer of city boundaries, summarize the average value of vacant parcels within each city boundary.Given a layer of counties and a layer of roads, summarize the total mileage of roads by road type within each county.

sum_within_layer : Required layer (see Feature Input in documentation)
A polygon feature layer or featurecollection. Features, or portions of features, in the summaryLayer (below) that fall within the boundaries of these polygons will be summarized.
summary_layer : Required layer (see Feature Input in documentation)
Point, line, or polygon features that will be summarized for each polygon in the sumWithinLayer.
sum_shape : Optional bool
A boolean value that instructs the task to calculate count of points, length of lines or areas of polygons of the summaryLayer within each polygon in sumWithinLayer.
shape_units : Optional string
Specify units to summarize the length or areas when sumShape is set to true. Units is not required to summarize points.
summary_fields : Optional list of strings
A list of field names and statistical summary type that you wish to calculate for all features in the summaryLayer that are within each polygon in the sumWithinLayer. Eg:[“fieldname1 summary”, “fieldname2 summary”]
group_by_field : Optional string
Specify a field from the summaryLayer features to calculate statistics separately for each unique attribute value.
minority_majority : Optional bool
This boolean parameter is applicable only when a groupByField is specified. If true, the minority (least dominant) or the majority (most dominant) attribute values within each group, within each boundary will be calculated.
percent_shape : Optional bool
This boolean parameter is applicable only when a groupByField is specified. If set to true, the percentage of shape (eg. length for lines) for each unique groupByField value is calculated.
output_name : Optional string
Additional properties such as output feature service name.
context : Optional string
Additional settings such as processing extent and output spatial reference.
gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.
dict with the following keys:
“result_layer” : layer (FeatureCollection) “group_by_summary” : layer (FeatureCollection)

trace_downstream

analysis.trace_downstream(input_layer, split_distance=None, split_units='Kilometers', max_distance=None, max_distance_units='Kilometers', bounding_polygon_layer=None, source_database=None, generalize=True, output_name=None, context=None, gis=None)

Determine the flow paths in a downstream direction from the locations you specify.

input_layer : Required layer (see Feature Input in documentation)

split_distance : Optional float

split_units : Optional string

max_distance : Optional float

max_distance_units : Optional string

bounding_polygon_layer : Optional layer (see Feature Input in documentation)

source_database : Optional string

generalize : Optional bool

output_name : Optional string

context : Optional string

gis :
Optional, the GIS on which this tool runs. If not specified, the active GIS is used.

trace_layer : layer (FeatureCollection)