amaptor.functions

amaptor.functions.get_workspace_factory_of_dataset(dataset_path)[source]
Provides the workspace factory type of a provided dataset - a convenience function that calls get_workspace type with the appropriate flag in the backgroun
Parameters:dataset_path – path to dataset to return workspace_factory value of
Returns:
amaptor.functions.get_workspace_type(dataset_path, factory_type=False)[source]
Gives us a workspace type that’s usable for layer.replaceDataSource in ArcMap based on a dataset path
Parameters:
  • dataset_path – path to dataset to return workspace type from
  • factory_type – boolean flag indicating whether to return the workspace_factory type or the standard dataset type - workspace factory values are not yet fully implemented
Returns:

amaptor.functions.make_layer_with_file_symbology(feature_class, layer_file, layer_name=None)[source]

Given a feature class or raster and a template layer file with symbology, returns a new Layer object that has the layer from the layer file with the feature class as its data source. Optionally, layer can be renamed with layer_name

This function will be scheduled for deprecation as it’s superceded by using the Layer object with a template layer. More testing needs to be done and maybe more code written in ArcMap to make the alternative apply to both cases. This will be deprecated when that’s complete

Parameters:
  • feature_class
  • layer_file
  • layer_name
Returns:

amaptor.functions.reproject_extent(extent, current_extent)[source]
Changes an extent from its current spatial reference to the spatial reference on another extent object
Parameters:
  • extent
  • current_extent
Returns: