Coder Social home page Coder Social logo

psu-oit-arc / aol-backend Goto Github PK

View Code? Open in Web Editor NEW
0.0 15.0 6.0 5.54 MB

The backend API which supports the Atlas of Oregon Lakes

Home Page: https://aol-backend.wdt.pdx.edu

Makefile 1.17% Python 96.37% HTML 0.33% Dockerfile 1.31% Shell 0.82%
lakes oregon geology bathymetry

aol-backend's Introduction

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: [email protected]
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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.