/docker-geomatic

Geoprocessing tools in Docker

Primary LanguagePythonMIT LicenseMIT

docker-geomatic

This is a docker container meant to work with Django Docker Processes to provide batch processing of GIS data over Django and Docker. So for example, if you wanted to turn a DEM to an RGB image, you could pass this container a URL containing the DEM data, let's call it elevation.dem and then use Django Docker Processes to set up a task that runs gdal_dem2rgb and handles the resulting image.

The following parameters are required as environment variables. There's no reason for the Docker container to be interactive or attached to a terminal - all data is captured by the script and POSTed to the RESPONSE_URL or ABORT_URL:

  • PARAMS or PARAMS_URL - a JSON object or url that contains at least the items "command", and "args" and/or "kwargs"
  • RESPONSE_URL - the URL of an endpoint that expects the results of the POST. This is set by Django Docker Processes and you should not override it.
  • ABORT_URL - the same as above, except for when something goes wrong
  • SRC_URL - the URL with which to retrieve the source data
  • SRC_FILENAME - the filename to use for the source data on disk.
  • UNZIP_SRC - set if the source file is a ZIP file, such as a shapefile. If you shapefile is in a subfolder in the ZIP file and not extracted to the root path, then you should prepend the subfolder path to SRC_FILENAME without a leading /.
  • ASSIGN_SRS - a .PRJ file as a string or the EPSG codestrings like "EPSG:4326" or "EPSG:3857". This tells docker-geomatic to write out a projection file because the source doesn't include one for some reason.

All typical GDAL and OGR programs installed by default on Ubuntu are supported.