Skip to content

USGS-WiM/nwis-mapper

Repository files navigation

Server setup

1. Deploy instance on AWS

current system specs
  • m3.large
  • 8GB attached volume
  • ubuntu server 14.04 LTS

2. Set up server

copy server setup script from github

wget https://raw.githubusercontent.com/USGS-WiM/nwis-mapper/master/server-config/server-setup.sh --no-check-certificate

run server setup script

sudo sh server-setup.sh

copy keys for SSL (HTTPS)

sudo cp [path to key]/server.crt /etc/ssl/certs/server.crt
sudo cp [path to key]/server.key /etc/ssl/private/server.key
sudo cp [path to key]/DigiCertCA.crt /etc/ssl/certs/DigiCertCA.crt

restart apache

sudo service apache2 restart

the nwis mapper application should now be running @ localhost

Generate new NWIS mapper tile cache

required software

ESRI ArcGIS Desktop ~10.3.1
Python 2.7
Python Pillow image library
AWS CLI

1. Run script to pull NWIS sites from USGS waterservices (tile-creation/1_getNWISSites.py)

python generateTileCache.py
  • takes about 3 hours minutes to run
  • queries NWIS site service for sites, adds them to a fileGDB
  • fileGDB feature classes are referenced within MXDs for each site type
  • this is a wrapper script that generates an ESRI tile cache, cleans it up then converts to TMS tiles
  • output can be uploaded directly to s3

2. Upload to amazon S3 (tile-creation/3_updateS3Bucket.py)

  • check to make sure paths are correct
python updateS3Bucket.py
  • takes about 8 minutes to run
  • loops over each folder in tile cache location, recursively deletes from s3 bucket then re-uploads new cache

About

USGS NWIS Mapper (Mapper interface for USGS NWIS Waterdata)

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •