All Projects → nansencenter → django-geo-spaas

nansencenter / django-geo-spaas

Licence: GPL-3.0 license
GeoDjango app for satellite data management in Geo-Scientific Platform as a Service

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects

Labels

Projects that are alternatives of or similar to django-geo-spaas

d2a
A translator Django into SQLAlchemy.
Stars: ✭ 23 (+21.05%)
Mutual labels:  geodjango
django-leaflet-admin-list
The Django Leaflet Admin List package provides an admin list view featured by the map and bounding box filter for the geo-based data of the GeoDjango.
Stars: ✭ 28 (+47.37%)
Mutual labels:  geodjango
docker-django
Base Docker image for Django and Gunicorn.
Stars: ✭ 29 (+52.63%)
Mutual labels:  geodjango
django-graphql-geojson
GeoJSON support for Graphene Django
Stars: ✭ 61 (+221.05%)
Mutual labels:  geodjango
representable
We’re creating maps of communities to fight for fair representation. Add your community to the map today and make your voice heard.
Stars: ✭ 14 (-26.32%)
Mutual labels:  geodjango

Django-Geo-SPaaS - GeoDjango Apps for satellite data management

Unit tests and build Coverage Status DOI

How to use Docker for development of Django-Geo-SPaaS

  1. Install Docker
  2. Clone django-geo-spaas and change into that directory
  3. Run ./build_container.sh. That will do the following:
  • build a Docker image with Nansat, Django and Django-Geo-SPaaS installed
  • create a project directory project in the current dir
  • create the database and update vocabularies
  • create a container with name geospaas with the current dir mounted to /src. Thus the container sees all changes you do to the geospaas code.
  1. Run docker start -i geospaas. That will launch bash inside the geospaas containter. From bash you can launch: python project/manage.py shell.
  2. If you want to mount more directories, you can run the following command:
docker create -it --name=geospaas \
    -v `pwd`:/src \
    -v /input/dir/on/host:/path/to/dir/in/container \
    geospaas

And then run docker start -i geospaas to go into the container and have access to commands. 6. Alretrnatively you can start the container in background: docker start geospaas and then execute commands in the runnning container: docker exec -i geospaas project/manage.py shell

How to use Docker for running Django-Geo-SPaaS

If you already have a project directory or if you are working on another app you can use the existing Docker image with Django-Geo-SPaaS. The image is already uploaded to Docker Hub, so no above steps are necessary. The workflow can be the following:

  1. Create a container with necessary directories mounted
  2. Start container in background
  3. Run Django commands from your host:
# create container named myapp from Docker image geospaas
docker create -it --name=myapp \
    -v /host/dir/myapp:/src \
    -v /data/dir:/data \
    nansencenter/geospaas

# start container in background
docker start myapp

# create project dir in /host/dir/myapp
docker exec myapp django-admin startproject myproject

# update settings.py
INSTALLED_APPS = [
    ...
    'django.contrib.gis',
    'leaflet',
    'django_forms_bootstrap',
    'geospaas.base_viewer',
    'geospaas.nansat_ingestor',
    'geospaas.catalog',
    'geospaas.vocabularies',
    'myproject',
]

...

DATABASES = {
    'default': {
        'ENGINE': 'django.contrib.gis.db.backends.spatialite',
        'NAME': os.path.join(BASE_DIR, 'geodjango.db'),
    }
}
# update urls.py
from django.contrib import admin
from django.urls import path, include

urlpatterns = [
    path('admin/', admin.site.urls),
    path('tests/', include('geospaas.base_viewer.urls')),
]
# migrate database schema
docker exec myapp /src/myproject/manage.py migrate

# update vocabularies
docker exec myapp /src/myproject/manage.py update_vocabularies

# ingest metadata
docker exec -w /src/myproject myapp ./manage.py ingest /data/myfiles*.nc

How to add new data to Geo-SPaaS catalog

Previsouly Vagrant/VirtualBox was used as a main provisionng mechanism. This is no longer supported.

Install geo-spaas-vagrant:

  git clone https://github.com/nansencenter/geo-spaas-vagrant
  cd geo-spaas-vagrant
  vagrant up geospaas_core

Connect to the virtual machine and use GeoSPaaS

  vagrant ssh geospaas_core
  cd django-geo-spaas/project
  ./manage.py ingest name_of_your_file
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].