Skip to content

CultivateGeospatial/CGS_GIS_Utilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CGS_GIS_Utilities

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.

Sections

Requirements

  • ArcGIS Pro 2.1 (or later)

Features

GIS utilities such as toolboxes, scripts, and models including:

Installation

Download the toolbox

  1. Download CGS_GIS_Utilities from Github.
    • If you download a .zip, extract it.

Connect the toolbox

  1. Create or open an ArcGIS Pro project.
  2. Add CGS Utilities.atbx to the project.
  3. Begin building your custom models.
    • NOTE: See CGS Examples.atbx for example models using the utilities.

Usage

Catalog Projects Script

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

Catalog Portal Script

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.

Publish Report Script

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.

Optional: logGis Implementation

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.

  1. Update the loggis_config.json with authentication parameters if necessary. (It's configured to authenticate with the active ArcGIS Pro account by default.)
  2. Import the logGis.py to the script you want to log.
import logGis
  1. Instantiate the logGis object.
loggis = logGis.LogGIS(__file__, "Cataloging Projects")
  1. Set the start info. This will update the AGO table with the time the tool started.
loggis.SetStartInfo()
  1. 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]}")
  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()

Resources

Issues


Find a bug or wat to request something new? Let us know by submitting a new issue.

About

These utilities allow GIS administrators to catalog and manage their GIS environments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages