https://github.com/psu-oit-arc/aol-backend
The backend API which supports the Atlas of Oregon Lakes
https://github.com/psu-oit-arc/aol-backend
bathymetry geology lakes oregon
Last synced: 5 months ago
JSON representation
The backend API which supports the Atlas of Oregon Lakes
- Host: GitHub
- URL: https://github.com/psu-oit-arc/aol-backend
- Owner: PSU-OIT-ARC
- Created: 2013-09-06T17:06:16.000Z (almost 13 years ago)
- Default Branch: main
- Last Pushed: 2024-02-17T00:53:08.000Z (over 2 years ago)
- Last Synced: 2026-01-14T03:59:16.928Z (6 months ago)
- Topics: bathymetry, geology, lakes, oregon
- Language: Python
- Homepage: https://aol-backend.wdt.pdx.edu
- Size: 5.41 MB
- Stars: 0
- Watchers: 13
- Forks: 6
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Atlas of Oregon Lakes
## Technology stack
- PostgreSQL 11
- PostGIS 2.5
- Python 3.11
- Django 3.2.x
- ArcGIS (Cloud/SaaS)
## Getting started
To prepare the database you may use, e.g., the `import_database` command to install a copy of production data.
To use the provided Docker container definitions:
docker compose up -d
To authenticate with the provided default user:
username: foobar@example.com
password: foobar
## Deploying
This project using the Emcee tooling to define and orchestrate resource provisioning and deployment.
See the AWS cloudformation templates in `cloudformation` and the command definitions in `commands.py`
for more information.
## General notes
It's very important to create an index like this:
CREATE INDEX observation_gist
ON observation
USING GIST (ST_BUFFER(ST_TRANSFORM(the_geom, 3644), 10));
This allows you to do intersection queries like:
ST_BUFFER(ST_TRANSFORM(the_geom, 3644), 10) && (SELECT the_geom FROM lake_geom WHERE reachcode = %s)
with *very* good performance. The magic '10' is arbitrary, but you should keep this consistent with
DISTANCE_FROM_ITEM in lakes.models.
We **cannot** do this in a migration unfortunately, since the observation table is part of a different application/schema
Some custom migrations exist that add fields (like an hstore), and setup stored procs and triggers. So don't go blindly deleting them.