The GIS Utilities package contains models and scripts to be used in ArcGIS Pro. These utilities allow GIS administrators to catalog and manage their GIS environments. There are cataloging tools for your local GIS and ArcGIS Portal. Cataloging generates a report that contains useful information such as: paths to your documents and source data, as well as determining whether or not the data is working or broken. Using the Publish Reports script, these results can be publish to ArcGIS Online or ArcGIS Enterprise and used withing maps and dashboards.
ArcGIS Dashboards are great tools for monitoring your GIS environments (example screenshot below). At a glance, they can provide you with insights that give you the information needed to take action when necessary. For example, you can create an interactive chart that you can click to display which layers are broken. From there, you can dive deeper to get to the root of the problem. Maybe a password for your SDE has been changed? Or maybe a server or folder was renamed. Once the problem is corrected, simply re-run the report and publish the new results to ArcGIS Online.
- ArcGIS Pro 2.1 (or later)
GIS utilities such as toolboxes, scripts, and models including:
- The cgs_examples folder contains:
- The cgs_utilities folder contains:
- The loggis.py script. Manual configuration is necessary.
- Download CGS_GIS_Utilities from Github.
- If you download a .zip, extract it.
- Create or open an ArcGIS Pro project.
- Add CGS Utilities.atbx to the project.
- Begin building your custom models.
- NOTE: See CGS Examples.atbx for example models using the utilities.
This script allows you to catalog ArcMap .mxd projects and ArcGIS Pro .aprx projects. The report generated is a .csv file.
NOTE: View the script's metadata for additional information, or click the i for specific parameter usage
This script allows you to catalog their Portal. The report generated is a .csv file.
NOTE: View the script's metadata for for additional information, or click the i for specific parameter usage.
This script allows you publish a .csv file to ArcGIS Online as a table (no geometry).
NOTE: View the script's metadata for for additional information, or click the i for specific parameter usage.
The logGis.py script allows users to log their scripts to a local .log file as well as an ArcGIS Online table. This is useful for keeping a close eye on all of your scheduled utilities.
NOTE: The first time you run a tool with logGis implemented, a feature layer (table) gets created in your ArcGIS Online or Portal.
EXAMPLE: See the catalogProjects_logGis.py script for an implementation example.
- Update the loggis_config.json with authentication parameters if necessary. (It's configured to authenticate with the active ArcGIS Pro account by default.)
- Import the logGis.py to the script you want to log.
import logGis
- Instantiate the logGis object.
loggis = logGis.LogGIS(__file__, "Cataloging Projects")
- Set the start info. This will update the AGO table with the time the tool started.
loggis.SetStartInfo()
- Add DEBUG, INFO, and ERROR logging where necessary.
loggis.logger.debug(f'Cataloging Document {fullPath}')
loggis.logger.info(f'script {loggis.ScriptFullPath} started.')
loggis.logger.error(f"ERROR @ Line {tb.tb_lineno} in file {__file__} with error: {sys.exc_info()[1]}")
- Finally, set end info in the AGO table, send an email if errors are detected, and clear the logging.
loggis.SetEndInfo()
loggis.emailLog()
loggis.logger.info(f'script completed.')
loggis.CompleteLogging()
- ESRI help for Geoprocessing.
- Need help integrating scripts into models? See ESRI's help docs.
Find a bug or wat to request something new? Let us know by submitting a new issue.