Giter Site home page Giter Site logo

openstreetmap-polska / openaedmap-backend Goto Github PK

View Code? Open in Web Editor NEW
8.0 5.0 0.0 1.06 MB

❤️ Backend powering OpenAEDMap.org — an OpenStreetMap's life-saving AED map

Home Page: https://OpenAEDMap.org

License: GNU Affero General Public License v3.0

Python 92.35% Nix 6.95% Mako 0.71%
aed defibrillator mapbox-vector-tile openstreetmap overpass-api python emergency geojson gis public-health

openaedmap-backend's Introduction

OpenAEDMap Backend 🌍❤️

Ever wanted to be a superhero? OpenAEDMap gives you that chance. By pinpointing AED locations via OpenStreetMap, we equip you with the power to save lives. Save a life today by visiting OpenAEDMap.org.

🔧 This repository hosts the backend code.

For frontend implementations, please see openaedmap-frontend.

🌟 Core Features

  • Automated OSM Updates: Downloads data and updates from OpenStreetMap.
  • AED Information: Serve comprehensive details about specific AED locations.
  • Vector Tiles: Create and serve vector tiles for map rendering.
  • Regional GeoJSON: Generate downloadable GeoJSON files by region.
  • Photo Integration: Allows uploading and viewing of photos of individual AEDs.

🌐 Deployed Instances

🛠️ Local Development

Getting Started

Before you jump in, make sure to install the ❄️ Nix package manager. It's your shortcut to seamless dependency management and reproducible environment setup. It will save you lots of time and spare you from unnecessary stress.

# Install dependencies and enter shell
nix-shell

# Start up the database
dev-start

# Launch the web server
uvicorn main:app

Navigate to http://localhost:8000 to access the web app locally.

Cleanup

# Terminate the database
dev-stop

# Purge database
dev-clean

openaedmap-backend's People

Contributors

starsep avatar ttomasz avatar vierian avatar zaczero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

openaedmap-backend's Issues

Return timezone of the state where AED is located

It is used for calculating whether AED is currently opened together with opening_hours.
Frontend uses Nominatim reverse geocoding API + timezone library to get this information.
It could be precalculated and kept in the database.
It should be recalculcated (cron job?) as borders of countries/states/timezones change.

Version returned is 0

Example:
https://openaedmap.org/api/v1/node/5140047708
returns

{
    "version": 0.6,
    "copyright": "OpenStreetMap and contributors",
    "attribution": "https://www.openstreetmap.org/copyright",
    "license": "https://opendatacommons.org/licenses/odbl/1-0/",
    "elements": [
        {
            "@photo_id": null,
            "@photo_url": null,
            "@timezone_name": "Europe/Warsaw",
            "@timezone_offset": "UTC+01:00",
            "type": "node",
            "id": 5140047708,
            "lat": 52.2399553,
            "lon": 21.0134473,
            "tags": {
                "defibrillator:location": "W hotelu Sofitel",
                "emergency": "defibrillator",
                "operator": "Sofitel"
            },
            "version": 0
        }
    ]
}

I would expect "version": 2
image
https://www.openstreetmap.org/node/5140047708

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.