geoanalytics¶
auth¶
- geoanalytics.auth(**kwargs)¶
Used to authorize GeoAnalytics Engine.
- Parameters
username (str) – GeoAnalytics Engine account username.
password (str) – GeoAnalytics Engine account password.
token (str) – GeoAnalytics Engine token used in place of a username and password. A token can be generated using the REST generateToken POST method or with ArcPy.
license_file (str) – Path to the GeoAnalytics Engine license file.
auth_info¶
- geoanalytics.auth_info()¶
Returns the GeoAnalytics Engine authorization information for the authorized user.
Example: geoanalytics.auth_info()
- Returns
DataFrame containing the authorization information.
- Return type
pyspark.sql.dataframe.DataFrame
create_optimal_sr¶
- geoanalytics.util.create_optimal_sr(extent, sr, property, custom_name)¶
Creates a spatial reference with a custom projected coordinate system optimal for the specified extent and intended purpose of your analysis.
Supported Properties:
EQUAL_AREA - Preserves the relative area of regions everywhere on earth. Shape and distances will be distorted.
CONFORMAL - Preserves angles in small areas, so shapes are for the most part preserved. Size and distances will be distorted.
EQUIDISTANT_ONE_POINT - Preserves distance when measured through the center of the projection. Area, shape, and other distances will be distorted.
EQUIDISTANT_MERIDIANS - Preserves distance when measured along meridians. Area, shape, and other distances will be distorted.
COMPROMISE_WORLD - Does not preserve area, shape, or distance specifically, but creates a balance between these geometric properties. Compromise projections are only suggested for very large areas.
- Parameters
extent (BoundingBox) – Extent of the area of analysis
sr – Geographic spatial reference used to create the custom projected coordinate system.
property (str) – A property that represents the purpose of the projection. Choose from EQUAL_AREA, CONFORMAL, EQUIDISTANT_ONE_POINT, EQUIDISTANT_MERIDIANS, COMPROMISE_WORLD.
custom_name (str, optional) – The name of the custom projected coordinate system. If unspecified, the name will be Custom_Projection.
- Returns
A spatial reference object
- Return type
SpatialReference
deauth¶
- geoanalytics.deauth()¶
Used to deauthorize GeoAnalytics Engine.
enable_warnings¶
- geoanalytics.enable_warnings()¶
Enables GeoAnalytics Engine warnings.
list_transformations¶
- geoanalytics.util.list_transformations(from_sr, to_sr, extent=None)¶
Returns a list of valid transformation methods. An extent can be used to narrow the list of valid transformation methods for a specific geographic area.
- Parameters
from_sr (SpatialReference) – The starting geographic coordinate system.
to_sr (SpatialReference) – The final geographic coordinate system.
extent (BoundingBox, optional) – Only transformations that span the entire extent will be returned. The extent needs to be specified in coordinates from the from_sr.
- Returns
A dataframe of valid transformation methods.
- Return type
pyspark.sql.DataFrame
register_gis¶
- geoanalytics.register_gis(name, url='https://arcgis.com', *, username, password)¶
Registers a GIS with the system. The GIS can be ArcGIS Online or ArcGIS Enterprise.
The name of the GIS can be supplied in place of credentials when accessing resources within the GIS (e.g. feature services).
- Parameters
name (str) – a user-defined name that identifies the GIS.
url (str) – URL for the GIS (e.g. https://arcgis.com or https://enterprise.example.com/portal). The default is ArcGIS Online.
username (str) – username for the GIS.
password (str) – password for the GIS.
unregister_gis¶
- geoanalytics.unregister_gis(name)¶
Unregisters a GIS from the system. The GIS can be ArcGIS Online or ArcGIS Enterprise.
- Parameters
name (str) – the user-defined name of a GIS registered with the system.
usage¶
- geoanalytics.usage(**kwargs)¶
Returns GeoAnalytics Engine usage information for the authorized user.
Valid time units for the span and period input parameters:
h, hour, hours
d, day, days
w, week, weeks
m, month, months
y, year, years
Example: geoanalytics.usage(span=”1m”, period=”2days”)
- Parameters
span (str, optional) – The time range covered by the returned usage DataFrame.
period (str, optional) – The aggregation interval for each row in the returned usage DataFrame.
- Returns
DataFrame containing the usage information.
- Return type
pyspark.sql.dataframe.DataFrame
version¶
- geoanalytics.version()¶
Returns the GeoAnalytics Engine version.
- Returns
GeoAnalytics Engine version.
- Return type
str