Skip to content

GNIP 47 Predefined Download Service

capooti edited this page Oct 31, 2014 · 2 revisions

GNIP 47: Predefined Download Service

Overview

It is proposed to add a predefined download service in GeoNode that will work independently from the actual direct access download service that is based on the GeoServer WFS and WCS services.

Proposed by

Ariel Núñez, Vivien Deparday, Paolo Corti

Assigned to release

It could be at the beginning released as a contrib application with the next GeoNode release.

Motivation

GeoNode currently uses GeoServer WFS and WCS to provide data downloads to the users. These downloads can heavily impact the GeoServer Java processes, so it is desirable to have something that is not based on OGC services but on pure Python. Also, the actual implementation of WCS does not let to provide an effective data download for rasters files.

Possibly related GNIPs

GNIP #45

Proposal

The download service should be a contrib Django application that will work on a layer by layer basis, and should let the layer owner to eventually enable it for the layer in place of the WFS/WCS implementation and customize it to his needs by setting the following parameters:

  • schedule
  • extent
  • formats
  • spatial reference

Schedule

The layer's owner can define how often the layer download files must be generated, for example just once or every hour/day/week/whatever (the options could be grabbed from a model or from the django-celery IntervalSchedule table)

default value: just once

Extent

The layer's owner can define the spatial extent of the layer download files to be generated. This could be the same extent of the layer or a part of it defined by an extent (xmin, ymin, xmax, ymax) inserted manually. It could even be possible to generate different layer's download files for different layer extents based on a layer's field. Or different layer's download files for different layer extents based on another layer's feature extents

default value: one single download file with the whole layer's extent

Formats

The layer's owner can select the download formats to be generated for his layer from the lists DOWNLOAD_FORMATS_VECTOR and DOWNLOAD_FORMATS_RASTER

default value: only zipped shapefile for vector data and geotiff for raster data are checked

Spatial Reference

The layer's owner can define that the download files will be generated using the 4326 spatial reference (used by GeoNode) and/or the original spatial reference and/or other spatial references selected from an EPSG srid list

How data are processed

The downloads builder process will run a celery task on a scheduled time (based on schedule), and will build one or more files (based on specified extent) in one or more formats (based on formats) in one or more spatial reference (based on the spatial reference parameter).

The task will use GDAL ogr2ogr and gdal_translate to generate the download files respectively for vector and raster formats.

Permissions

The download files will be available to a GeoNode user if he will have the download_resourcebase permission for that layer. The static file server (nginx, httpd, whatever) will be aware of the permission system securing the downloads with x-sendfile (we could use django-sendfile for this purpose)

Dependencies

OS dependecies:

  • GDAL
  • a message broker such as RabbitMQ or similiar

Python dependencies:

  • django-celery
  • GDAL
  • django-sendfile

Issues

As of the time of creation:

#171

#889

#1485

Useful links

http://www.slideshare.net/DebbieWilson2/implementing-inspire-download-services

http://sweco-fme.com/fmesite/sites/default/files/presentations_2010/03_b_o_grotan_inspire_download_services.pdf

Clone this wiki locally