Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
clarifying and expanding docs/resources.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislavhorky committed Oct 31, 2017
1 parent 6704b87 commit 73967cc
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions docs/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,28 @@

This file is the authoritative mapproxy resource documentation. Please, keep it in sync with the actual implementation.

# Resource definition file

Most common way to define resources for mapproxy is to provide JSON resource definition file and point mapproxy to it by specifying its path in `resource-backend.path` configuration parameter.

The resource definition file can contain resource definitions or include
subsequent definition files:
```
[
Resource, // see below
Resource,
...
{ "include": String }, // path to other definition file to include.
... // may be relative to current directory
]
```

# 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
* geodata: vector free layers, monolithic or tiled

Mapproxy provides multiple drivers (*generators*) for each resource type.

Expand Down Expand Up @@ -46,10 +62,10 @@ Resampling: Enum {
Where `texture` is resampling suitable for rextures (`average` for scales smaller than 0.5, `cubic` otherwise)
and `dem` is suitable for terrain (`average` for scales smaller than 0.5, `cubicspline` otherwise).

Basic resource layout:
Basic resource definition:

```javascript
resource = {
Object Resource = {
String comment // any comment, ignored
String group // group this resource belongs to
String id // resource identifier (withing group)
Expand Down Expand Up @@ -209,12 +225,11 @@ definition = {

String dataset // path to complex dataset
Optional String mask // optional mask, generated by mapproxy-rf-mask tool
Optional Int textureLayerId // numeric bound layer ID
Optional String heightcodingAlias // dataset is registered under given alias
}
```
## Geodata
## Geodata drivers
Geodata drivers generate vector geographic data in the form of VTS free layer.
Expand Down Expand Up @@ -263,14 +278,11 @@ Browser options override any browser options from associated surface.
### geodata-vector-tiled
Generates tiled geodata (`geodata-tiles` type) from pre-tiled data. Input tiling must match reference frame's space division,
at least in one of its nodes. For example, OSM tiles in pseudomerc projection can be used in `webmerc-projected`
and `webmerc-unprojected` reference frames and in the `pseudomerc` subtree in in `melown2015` reference frame.
Generates tiled geodata (`geodata-tiles` type) from pre-tiled data like MVT web service or `.mbtiles` archive. Input tiling must match reference frame's space division, at least in one of its nodes. For example, OSM tiles in pseudomerc projection can be used in `webmerc-projected` and `webmerc-unprojected` reference frames and in the `pseudomerc` subtree in in `melown2015` reference frame.
Configuration is the same as for `geodata-vector` driver but input interpretation is different and served data are
different.
Configuration is the same as for `geodata-vector` driver but input interpretation is different: option `definition.dataset` is:
* for web services: a URL template that is expanded (see above) for each requested tile before opening and processing.
* for MBTiles: a path to `.mbtiles` archive with appended template for tiles: `path/to/myvectors.mbtiles/{loclod}-{locx}-{locy}`
Geodata's metatiles are generated purely from heightcoding GDAL dataset.
Option `definition.dataset` is a OGR dataset path/URL template that is expanded for each requested tile before opening
and processing.

0 comments on commit 73967cc

Please sign in to comment.