Utilities for managing GeoData@Wisconsin.
See Manage Geodata Utilities Installation for information on installing, updating, and uninstalling Geodata Utils and virtual environments.
When you need to open this environment in the future, open "Python Command Prompt" and run:
activate geodata-utilsSee Configure Geodata Utilities to learn about configuring your install. You can configure Solr connections, what error checks are run, logging, and metadata schemas.
update_solr [-h] -i INSTANCE (-a ADD | -d DELETE | -dc DELETE_COLLECTION | -dp DELETE_PROVENANCE | -p)
[-r] [--version]
options:
-h, --help show this help message and exit
-i INSTANCE --instance INSTANCE
Identify which instance of Solr to use.
-a ADD, --add ADD Indicate path to a single file or folder with GeoBlacklight JSON files that will be uploaded.
-d DELETE, --delete DELETE
Delete the provided unique record ID (layer_slug_s) from the Solr index.
-dc DELETE_COLLECTION, --delete-collection DELETE_COLLECTION
Remove an entire collection from the Solr index.
-dp DELETE_PROVENANCE, --delete-provenance DELETE_PROVENANCE
Remove all records from Solr index that belong to the specified provenance.
-p, --purge Delete the entire Solr index.
-r, --recursive [Deprecated] Recurse into subfolders when adding JSON files.
--version show program's version number and exit
Examples:
# Add record from file
update_solr -i test -a record.json
# Add records in directory and all subdirectories
update_solr -i test -a path/to/directory/
# Delete a record where layer_slug_s is a45fea1d-a45a-4cb4-85d8-4054ef70fd7f
update_solr -i test -d a45fea1d-a45a-4cb4-85d8-4054ef70fd7f
# Delete records that are part of a specific collection
update_solr -i test -dc Statewide
# Delete records of a specified provenance
update_solr -i test -dp "Some Agency"
# Purge all records
update_solr -i test -pgu_config [-h] (-e | -i)
options:
-h, --help show this help message and exit
-e, --edit Open Geodata Utilities config file for editing.
-i, --init Initiate Geodata Utilities config file and open for editing.
Examples:
# Open config file for editing
gu_config -e
# Initialize config file (use copy of template)
gu_config --initSee the Indexed Datasets doc for details on subcommands.
indexed [-h] [--version]
{coordinate-precision,p,check-urls,cu,minify-geojson,m,update-url,uu,remove-missing-tiles,rt} ...
options:
-h, --help show this help message and exit
--version show program's version number and exit
subcommands:
This program uses several subcommands. Use the help for each for more information.
coordinate-precision (p)
Read indexed dataset GeoJSON, reduce coordinate precision, and output to specified directory.
check-urls (cu) Check URLs in GeoJSON of indexed datasets to confirm they resolve.
minify-geojson (m) Minify geojson to have no return/new lines and no indentation. Optionally choose an indentation level.
update-url (uu) Update websiteUrl of geojson to specified new URL.
remove-missing-tiles (rt)
Remove tiles from index geojson where downloadUrl returns 404.