GeoEco.ArcGIS.GeoprocessorManager.ArcGISObjectExists
- classmethod GeoprocessorManager.ArcGISObjectExists(path, correctTypes, typeDisplayName)
Tests that a given path to an ArcGIS object exists and that the object is of a given type.
This method uses the ArcGIS geoprocessor’s Exists and Describe functions to check the existence and type of the object.
- Parameters:
path (
str) – Path to the object (e.g. a file, directory, raster, shapefile, table, etc.). Minimum length꞉ 1.correctTypes (
listofstr) – List of data types that the object is expected to be, chosen from the possible values of the dataType property of the object returned byDescribe(). Please see the documentation for that function for the possible values.typeDisplayName (
str) – Name of the expected data type of the object to display in logging messages. This is usually a more generic name than the entries that appear in correctTypes. For example, if the object is expected to be some kind of table, correctTypes may contain five or ten possible values, while typeDisplayName might simply be “table”. Minimum length꞉ 1.
- Returns:
A
tupleof twobool, where the first is True if the geoprocessor’sExists()function reports that the specified path exists, and the second True if the geoprocessor’sDescribe()function reports that it is one of the types of objects specified by correctTypes.- Return type: