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(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_layerRequired layer (see Feature Input in documentation)

Point layer to be aggregated

polygon_layerRequired layer (see Feature Input in documentation)

Polygon layer to which the points should be aggregated.

keep_boundaries_with_no_pointsOptional bool

Specify whether the polygons without any points should be returned in the output.

summary_fieldsOptional list of strings

A list of field names and summary type. Example [fieldName1 summaryType1,fieldName2 summaryType2].

group_by_fieldOptional string

A field name from PointLayer based on which the points will be grouped.

minority_majorityOptional 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_pointsOptional 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_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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_layerRequired layer (see Feature Input in documentation)

The point or line features from which to calculate density.

fieldOptional 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_sizeOptional 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_unitsOptional string

The units of the cellSize value

radiusOptional float

A distance specifying how far to search to find point or line features when calculating density values.

radius_unitsOptional string

The units of the radius parameter.

bounding_polygon_layerOptional layer (see Feature Input in documentation)

A layer specifying the polygon(s) where you want densities to be calculated.

area_unitsOptional string

The units of the calculated density values.

classification_typeOptional string

Determines how density values will be classified into polygons.

num_classesOptional 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_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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_layerRequired layer (see Feature Input in documentation)

The routes start from points in the origins layer.

destinations_layerRequired layer (see Feature Input in documentation)

The routes end at points in the destinations layer.

measurement_typeRequired 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_fieldOptional string

The field in the origins layer containing the IDs that are used to match an origin with a destination.

destinations_layer_route_id_fieldOptional string

The field in the destinations layer containing the IDs that are used to match an origin with a destination.

time_of_dayOptional 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_dayOptional 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_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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_layerRequired layer (see Feature Input in documentation)

The input to be buffered.

distancesOptional list of floats

The distance(s) that will be buffered.

fieldOptional string

Buffers will be created using field values.

unitsOptional string

The linear unit to be used with the distance value(s).

dissolve_typeOptional string

Specifies the dissolve to be performed to remove buffer overlap.

ring_typeOptional string

The ring type.

side_typeOptional string

The side(s) of the input that will be buffered.

end_typeOptional string

The shape of the buffer at the end of buffered line features.

output_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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_itemRequired item

The route data item that is used to create route layer items.

delete_route_data_itemRequired 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_prefixOptional 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(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(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(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_layersRequired list of strings

A list of layers that will be used in the expressions parameter.

expressionsRequired string

Specify a list of expressions. Please refer documentation at http://developers.arcgis.com for more information on expressions.

output_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(dissolve_fields=[], summary_fields=[], output_name=None, context=None, gis=None)

Dissolve features based on specified fields.

input_layerRequired layer (see Feature Input in documentation)

The layer containing polygon features that will be dissolved.

dissolve_fieldsOptional 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_fieldsOptional 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_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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_layerRequired layer (see Feature Input in documentation)

Feature layer to enrich with new data

data_collectionsOptional list of strings

Data collections you wish to add to your features.

analysis_variablesOptional list of strings

A subset of specific variables instead of dataCollections.

countryOptional 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_typeOptional string

Area to be created around the point or line features for enrichment. Default is 1 Mile straight-line buffer radius.

distanceOptional float

A double value that defines the straight-line distance or time (when drivingTime is used).

unitsOptional string

The unit (eg. Miles, Minutes) to be used with the distance value(s) specified in the distance parameter to calculate the area.

output_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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_layersRequired list of strings

The layers from which you can extract features.

extentOptional string

The area that defines which features will be included in the output zip file or layer package.

clipOptional bool

Select features that intersect the extent or clip features within the extent.

data_formatOptional string

Format of the data that will be extracted and downloaded. Layer packages will always include file geodatabases.

output_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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_layersRequired list of strings

A list of layers that will be used in the expressions parameter.

expressionsRequired string

Specify a list of expressions. Please refer documentation at http://developers.arcgis.com for more information on creating expressions.

output_nameOptional string

Additional properties such as output feature service name.

contextOptional 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_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_fieldOptional string

The numeric field in the AnalysisLayer that will be analyzed.

divided_by_field : Optional string

bounding_polygon_layerOptional 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_layerOptional 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_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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_layerRequired layer (see Feature Input in documentation)

For each feature in this layer, the task finds the nearest features from the nearLayer.

near_layerRequired layer (see Feature Input in documentation)

The features from which the nearest locations are found.

measurement_typeRequired string

The nearest locations can be determined by measuring straight-line distance, driving distance, or driving time

max_countOptional int

The maximum number of near locations to find for each feature in analysisLayer.

search_cutoffOptional float

Limits the search range to this value

search_cutoff_unitsOptional string

The units for the value specified as searchCutoff

time_of_dayOptional 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_nameOptional string

Additional properties such as output feature service name

contextOptional 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(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(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_layerRequired layer (see Feature Input in documentation)

The point layer whose features will be interpolated.

fieldRequired string

Name of the numeric field containing the values you wish to interpolate.

interpolate_optionOptional 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_errorOptional bool

If True, a polygon layer of standard errors for the interpolation predictions will be returned in the predictionError output parameter.

classification_typeOptional string

Determines how predicted values will be classified into areas.

num_classesOptional 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_breaksOptional 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_layerOptional layer (see Feature Input in documentation)

A layer specifying the polygon(s) where you want values to be interpolated.

predict_at_point_layerOptional 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_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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(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_layerRequired layer (see Feature Input in documentation)

The point, line, or polygon features to merge with the mergeLayer.

merge_layerRequired 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_attributesOptional 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_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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_layerRequired layer (see Feature Input in documentation)

The input analysis layer.

overlay_layerRequired layer (see Feature Input in documentation)

The layer to be overlaid with the analysis layer.

overlay_typeOptional string

The overlay type (INTERSECT, UNION, or ERASE) defines how the analysis layer and the overlay layer are combined.

snap_to_inputOptional 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_typeOptional string

The type of intersection (INPUT, LINE, POINT).

toleranceOptional 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_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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(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_layerRequired layer (see Feature Input in documentation)

Point, line, or polygon features from which distances will be measured to features in the summarizeLayer.

summary_layerRequired 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_typeOptional string

Defines what kind of distance measurement you want to use to create areas around the nearbyLayer features.

distancesRequired list of floats

An array of double values that defines the search distance for creating areas mentioned above

unitsOptional string

The linear unit for distances parameter above. Eg. Miles, Kilometers, Minutes Seconds etc

time_of_dayOptional 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_dayOptional 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_boundariesOptional 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_shapeOptional 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_unitsOptional string

Specify units to summarize the length or areas when sumShape is set to true. Units is not required to summarize points.

summary_fieldsOptional 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_fieldOptional string

Specify a field from the summaryLayer features to calculate statistics separately for each unique value of the field.

minority_majorityOptional 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_shapeOptional 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_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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_layerRequired 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_layerRequired layer (see Feature Input in documentation)

Point, line, or polygon features that will be summarized for each polygon in the sumWithinLayer.

sum_shapeOptional 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_unitsOptional string

Specify units to summarize the length or areas when sumShape is set to true. Units is not required to summarize points.

summary_fieldsOptional 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_fieldOptional string

Specify a field from the summaryLayer features to calculate statistics separately for each unique attribute value.

minority_majorityOptional 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_shapeOptional 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_nameOptional string

Additional properties such as output feature service name.

contextOptional 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(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)