geoanalytics_fabric¶
create_optimal_sr¶
- geoanalytics_fabric.util.create_optimal_sr(extent, sr, property, custom_name=None)¶
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. Shapes and distances will be distorted.
CONFORMAL - Preserves angles in small areas. Shapes, sizes, and distances will be distorted.
EQUIDISTANT_ONE_POINT - Preserves distances when measured through the center of the projection. Areas, shapes, and other distances will be distorted.
EQUIDISTANT_MERIDIANS - Preserves distances when measured along meridians. Area, shape, and other distances will be distorted.
COMPROMISE_WORLD - Does not preserve areas, shapes, or distances 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
enable_warnings¶
- geoanalytics_fabric.enable_warnings()¶
Enables ArcGIS GeoAnalytics for Microsoft Fabric warnings.
disable_warnings¶
- geoanalytics_fabric.disable_warnings()¶
Disables ArcGIS GeoAnalytics for Microsoft Fabric warnings.
list_transformations¶
- geoanalytics_fabric.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_fabric.register_gis(name, url='https://arcgis.com', *, username=None, password=None, cert_file=None, cert_password=None, client_id=None, authorization_code=None)¶
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.
cert_file (str) – Path to certificate file.
cert_password (str) – Password for certificate.
client_id (str) – Client id used for registering an OAuth 2.0 protected GIS.
authorization_code (str) – Authorization code is required when client_id is provided. Generate an authorization code through the following URL (replace “<url>” and “<client_id>” with the url and client_id): <url>/sharing/oauth2/authorize?client_id=<client_id>&response_type=code&redirect_uri=urn:ietf:wg:oauth:2.0:oob.
unregister_gis¶
- geoanalytics_fabric.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.
version¶
- geoanalytics_fabric.version()¶
Returns the ArcGIS GeoAnalytics for Microsoft Fabric version.
- Returns
ArcGIS GeoAnalytics for Microsoft Fabric version.
- Return type
str