From 15d8524bf9a1315714494479c152c620423cfb58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Bla=C5=BEek?= Date: Thu, 25 May 2017 18:17:45 +0200 Subject: [PATCH] Create resources.md --- docs/resources.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 docs/resources.md diff --git a/docs/resources.md b/docs/resources.md new file mode 100644 index 0000000..0d86b2e --- /dev/null +++ b/docs/resources.md @@ -0,0 +1,57 @@ +# Supported resource types/drivers + +Mapproxy supports following resource types: + * tms: *tile map service* (bound layer) + * surface: surfaces (i.e. tileset generator) + * geodata: vector free layers + +Mapproxy provides multiple drivers (*generators*) for each resource type. + +## Basic resource layout + +NB: In following, all resource definitions are documented by pseudo format. Actual configuration is either +a JSON file on disk (for JSON resource backend) or a python data tree. + + * `{}`: JSON object/python dictionary + * `[]` JSON/python array + * `String`: string data type + * `Int`: integral JSON number/python integer + * `Double`: real JSON number/python double + * `Boolean`: boolean JSON/python value + * `Array`: array of given type(s) + * `Optional` given entry is optional + * `?` no fixed name + +Basic resource layout: + +resource = { + String comment // any comment, ignored + String group // group this resource belongs to + String id // resource identifier (withing group) + String type // data type (tms, surface, geodata) + String driver // data generator (see below) + Object registry // additional local resource registry, see below + Array credits // list of credits identifiers (either textual or numeric) + Object referenceFrames = { // range definitions for different reference frames + Object ? = { // reference frame ID, for example melown2015 + lodRange: [ Int, Int ] // LOD range this resource produces data + tileRange: [[Int, Int], [Int, Int]] // tile range: minx, miny, maxx, maxy; inclusive range + } + } + Object definition = {...} // driver-dependent definition, see below +} + +## TMS drivers + +### tms-raster + +Raster-based bound layer generator. Uses any raster GDAL dataset as its data source. Supports optional data masking. + +```javascript +definition = { + String dataset // path to GDAL dataset + Optional String mask // path to RF mask or masking GDAL dataset + Optional String format // output image format, "jpg" or "png" (defaults to "jpg") + Optional Boolean transparent // Boundlayer is transparent, forces format to "png" +} +```