This is a collection of tools to process the data needed to support the Facility Website, and the now obsolete Buildings Website. It also includes tools to add photos to the facilities database and the web server.
Only the facilities-website-tools
and Photo Processing
folders are
currently being used. The others are historical as of 2021.
Obsolete quality control SQL scripts for building data in the old national data standard.
SQL Scripts to to create the building and photo lists for the website. These
have been replaced by the Python script (for buildings.csv
), and the Photo
Processing folder for photos.json
.
Facilities.lyr
- The symbology for the facilities layers in the web mapping service used in the website.facilities.sql
- A SQL script that needs to be run as a single command. It will create four results windows which need to be saved asfacilities.csv
,assets.csv
,parents.csv
, andall_assets.csv
respectively.make_children.py
- A Python script to readparents.csv
andall_assets.csv
and createdchildren.json
andassets.json
.MultiplePhotoIds.sql
- The way that photos can be associated with various facilities in different feature classes is very flexible, but that makes it very complicated to combine all the possible combinations into a single list that can be easily used in a website. This query helped test the various combinations that were eventually used infacilities.sql
.
See the Facilities Website for details on how the products of these scripts are deployed to make the website work.
Primarily a Python script that was deployed as a scheduled task to make a nightly request of the FMSS web service to collect data from FMSS for inclusion in the facilities database and then the website. Unfortunately, the web service does not have all the attributes that we need, so we have abandoned this effort for a manual method as described in the FMSS Export Instructions in the Enterprise QC repo.
ArcGIS snippets to select only those buildings without an FMSS relationship
(NOFMSS.exp
) and to do a field calc to create a GUID (addGUID.cal
).
Not really needed for the website, but here they are anyway 😄.
Tools for processing photo files into a list of photos to be inserted into the
database, and copied to the web server. It also has tools for
creating the photos.json
file that is deployed to the website and powers the
photo part of the facilities website. See the
Readme
and workflow
documents in the folder for more details.
This folder is also deployed to the GIS Team drive with the facility related photos.
There is nothing to build to use these tools.
These tools do not need to be deployed. Just clone this repository to a local file system.
Before executing a python script, open it in a text editor and check any path or file names in the script that should be edited to reflect the file system where the script and data are deployed. The script can then be run in a CMD/Powershell window, with the IDLE application, with the Python extension to VS Code, or any other Python execution environment.
- Open the script file in SQL Server Management Studio (SSMS), or Azure Data Studio.
- Connect to the appropriate server and database.
- Select the statement you want to run and click
Run
in the toolbar. When applicable, see the comments in the file, you can run all the SQL commands in the file sequentially by clickingRun
when nothing is selected.