Code Monkey home page Code Monkey logo

geo-app's Introduction

Geospatial data app API

APi project for working with geospatial data. Interacts with a database table of places with id, name, description and coordinates fields.

API demonstration video: link.

Features

  • documentation at /api/doc/swagger/
  • getting a list of places
  • creating a place
  • retrieving a place by its ID
  • updating (and partial updating) a place
  • deleting a place
  • getting a place that is the nearest to provided coordinates as a query parameter

Technologies used:

  • Django REST Framework
  • PostgreSQL and PostGIS

Run with docker

Docker should be installed.

  1. Clone project
git clone https://github.com/yuliia-stopkyna/geo-app.git
cd geo-app
  1. Create .env file with your environment variables (look at .env.sample example file) in the project directory.

  2. Run docker

docker-compose build
docker-compose up

Run without docker

Install PostgreSQL with PostGIS extension and create database.

  1. Clone project and create virtual environment
git clone https://github.com/yuliia-stopkyna/geo-app.git
cd geo-app
python -m venv venv
source venv/bin/activate # on MacOS
venv\Scripts\activate # on Windows
pip install -r requirements.txt
  1. Install Geospatial libraries (GDALL, GEOS, PROJ): more information about it here.
  • On Debian/Ubuntu
sudo apt-get install binutils libproj-dev gdal-bin
  • macOS instruction is here.

  • If you run on Windows, you can use OSGeo4W installer for geospatial libraries. Make sure to pick GDAL package. Then, in the geo_app/settings.py uncomment GDAL_LIBRARY_PATH, GEOS_LIBRARY_PATH, PROJ_LIB and specify the path to the corresponding files on your computer (must be in OSGeo4W directory).

  1. Set environment variables
set POSTGRES_HOST=<your db host>
set POSTGRES_DB=<your db name>
set POSTGRES_USER=<your db user>
set POSTGRES_PASSWORD=<your db password>
set DJANGO_SECRET_KEY=<your Django secret key>
  1. Make migrations and run server
python manage.py migrate
python manage.py runserver

geo-app's People

Contributors

yuliia-stopkyna avatar

Watchers

 avatar

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.