Skip to content

Commit 74e49c1

Browse files
committed
docs: update README.md to improve formatting and add missing operation sections
1 parent d3fc485 commit 74e49c1

1 file changed

Lines changed: 82 additions & 24 deletions

File tree

versatiles_pipeline/README.md

Lines changed: 82 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ from_stacked [
4444

4545
# READ operations
4646

47-
## `from_color`
47+
---
48+
49+
## from_color
4850

4951
Generates solid-color tiles of the specified size and format.
5052

@@ -54,23 +56,45 @@ Generates solid-color tiles of the specified size and format.
5456
- *`size`: u16 (optional)* - Tile size in pixels (256 or 512). Defaults to 512.
5557
- *`format`: String (optional)* - Tile format: one of "avif", "jpg", "png", or "webp". Defaults to "png".
5658

57-
## `from_container`
59+
---
60+
61+
## from_container
5862

5963
Reads a tile container, such as a `*.versatiles`, `*.mbtiles`, `*.pmtiles` or `*.tar` file.
6064

6165
### Parameters
6266

6367
- **`filename`: String (required)** - The filename of the tile container. This is relative to the path of the VPL file. For example: `filename="world.versatiles"`.
6468

65-
## `from_debug`
69+
---
70+
71+
## from_debug
6672

6773
Generates debug tiles that display their coordinates as text.
6874

6975
### Parameters
7076

7177
- *`format`: String (optional)* - Target tile format: one of `"mvt"` (default), `"avif"`, `"jpg"`, `"png"` or `"webp"`
7278

73-
## `from_gdal_raster`
79+
---
80+
81+
## from_gdal_dem
82+
83+
Reads a GDAL DEM dataset and produces terrain RGB tiles (Mapbox or Terrarium encoding).
84+
85+
### Parameters
86+
87+
- **`filename`: String (required)** - The filename of the GDAL DEM dataset to read. For example: `filename="dem.tif"`.
88+
- *`encoding`: String (optional)* - The DEM encoding format: `"mapbox"` or `"terrarium"`. (default: `"mapbox"`)
89+
- *`tile_size`: u32 (optional)* - The size of the generated tiles in pixels. (default: 512)
90+
- *`level_max`: u8 (optional)* - The maximum zoom level to generate tiles for. (default: the maximum zoom level based on the dataset's native resolution)
91+
- *`level_min`: u8 (optional)* - The minimum zoom level to generate tiles for. (default: level_max)
92+
- *`gdal_reuse_limit`: u32 (optional)* - How often to reuse a GDAL instance. (default: 100) Set to a lower value if you have problems like memory leaks in GDAL.
93+
- *`gdal_concurrency_limit`: u8 (optional)* - The number of maximum concurrent GDAL instances to allow. (default: 4) Set to a higher value if you have enough system resources and want to increase throughput.
94+
95+
---
96+
97+
## from_gdal_raster
7498

7599
Reads a GDAL raster dataset and exposes it as a tile source.
76100
Hint: When using "gdalbuildvrt" to create a virtual raster, don't forget to set `-addalpha` option to include alpha channel.
@@ -85,7 +109,9 @@ Hint: When using "gdalbuildvrt" to create a virtual raster, don't forget to set
85109
- *`gdal_reuse_limit`: u32 (optional)* - How often to reuse an GDAL instances. (default: 100) Set to a lower value if you have problems like memory leaks in GDAL.
86110
- *`gdal_concurrency_limit`: u8 (optional)* - The number of maximum concurrent GDAL instances to allow. (default: 4) Set to a higher value if you have enough system resources and want to increase throughput.
87111

88-
## `from_merged_vector`
112+
---
113+
114+
## from_merged_vector
89115

90116
Merges multiple vector tile sources.
91117
Each resulting tile will contain all the features and properties from all the sources.
@@ -94,15 +120,19 @@ Each resulting tile will contain all the features and properties from all the so
94120

95121
All tile sources must provide vector tiles.
96122

97-
## `from_stacked`
123+
---
124+
125+
## from_stacked
98126

99127
Overlays multiple tile sources, using the tile from the first source that provides it.
100128

101129
### Sources
102130

103131
All tile sources must have the same format.
104132

105-
## `from_stacked_raster`
133+
---
134+
135+
## from_stacked_raster
106136

107137
Overlays multiple raster tile sources on top of each other.
108138

@@ -115,15 +145,19 @@ All tile sources must provide raster tiles in the same resolution. The first sou
115145
- *`format`: TileFormat (optional)* - The tile format to use for the output tiles. Default: format of the first source.
116146
- *`auto_overscale`: bool (optional)* - Whether to automatically overscale tiles when a source does not provide tiles at the requested zoom level. Default: `false`.
117147

118-
## `from_tile`
148+
---
149+
150+
## from_tile
119151

120152
Reads a single tile file and uses it as a template for all tile requests.
121153

122154
### Parameters
123155

124156
- **`filename`: String (required)** - The filename of the tile. Supported formats: png, jpg/jpeg, webp, avif, pbf/mvt. The format is automatically detected from the file extension.
125157

126-
## `from_tilejson`
158+
---
159+
160+
## from_tilejson
127161

128162
Reads tiles from a remote tile server via a TileJSON endpoint.
129163
The TileJSON is fetched from the given URL, and tiles are loaded individually
@@ -139,7 +173,9 @@ using the URL template from the TileJSON `tiles` array.
139173

140174
# TRANSFORM operations
141175

142-
## `dem_quantize`
176+
---
177+
178+
## dem_quantize
143179

144180
Quantize DEM (elevation) raster tiles by zeroing unnecessary low bits.
145181
Computes a per-tile quantization mask from two physically meaningful criteria:
@@ -152,7 +188,9 @@ The stricter (smaller step) wins. Single-pass — no min/max scan needed.
152188
- *`max_gradient_error`: f64 (optional)* - Maximum allowed gradient change in degrees due to quantization. Defaults to 1.0.
153189
- *`encoding`: String (optional)* - Override auto-detection of DEM encoding. Values: "mapbox", "terrarium".
154190

155-
## `filter`
191+
---
192+
193+
## filter
156194

157195
Filter tiles by bounding box and/or zoom levels.
158196

@@ -162,7 +200,9 @@ Filter tiles by bounding box and/or zoom levels.
162200
- *`level_min`: u8 (optional)* - minimal zoom level
163201
- *`level_max`: u8 (optional)* - maximal zoom level
164202

165-
## `meta_update`
203+
---
204+
205+
## meta_update
166206

167207
Update metadata, see also <https://github.com/mapbox/tilejson-spec/tree/master/3.0.0>
168208

@@ -177,25 +217,31 @@ Update metadata, see also <https://github.com/mapbox/tilejson-spec/tree/master/3
177217
- *`name`: String (optional)* - Name text.
178218
- *`schema`: TileSchema (optional)* - Tile schema, allowed values: "rgb", "rgba", "dem/mapbox", "dem/terrarium", "dem/versatiles", "openmaptiles", "shortbread@1.0", "other", "unknown"
179219

180-
## `raster_flatten`
220+
---
221+
222+
## raster_flatten
181223

182224
Flattens (translucent) raster tiles onto a background
183225

184226
### Parameters
185227

186228
- *`color`: [u8,u8,u8] (optional)* - background color to use for the flattened tiles, in RGB format. Defaults to white.
187229

188-
## `raster_format`
230+
---
189231

190-
Filter tiles by bounding box and/or zoom levels.
232+
## raster_format
233+
234+
Convert raster tiles to a different image format and/or adjust quality/speed settings.
191235

192236
### Parameters
193237

194238
- *`format`: String (optional)* - The desired tile format. Allowed values are: AVIF, JPG, PNG or WEBP. If not specified, the source format will be used.
195239
- *`quality`: String (optional)* - Quality level for the tile compression (only AVIF, JPG or WEBP), between 0 (worst) and 100 (lossless). To allow different quality levels for different zoom levels, this can also be a comma-separated list like this: "80,70,14:50,15:20", where the first value is the default quality, and the other values specify the quality for the specified zoom level (and higher).
196-
- *`speed`: u8 (optional)* - Compression speed (only AVIF), between 0 (slowest) and 100 (fastest).
240+
- *`speed`: u8 (optional)* - Compression speed, between 0 (slowest) and 100 (fastest).
241+
242+
---
197243

198-
## `raster_levels`
244+
## raster_levels
199245

200246
Adjust brightness, contrast and gamma of raster tiles.
201247

@@ -205,7 +251,9 @@ Adjust brightness, contrast and gamma of raster tiles.
205251
- *`contrast`: f32 (optional)* - Contrast adjustment, between 0 and infinity. Defaults to 1.0 (no change).
206252
- *`gamma`: f32 (optional)* - Gamma adjustment, between 0 and infinity. Defaults to 1.0 (no change).
207253

208-
## `raster_mask`
254+
---
255+
256+
## raster_mask
209257

210258
Apply a polygon mask from GeoJSON to raster tiles.
211259
Pixels outside the polygon become transparent.
@@ -217,7 +265,9 @@ Pixels outside the polygon become transparent.
217265
- *`blur`: f32 (optional)* - Edge blur distance in meters. Creates a soft transition at the mask edge. Default: 0
218266
- *`blur_function`: String (optional)* - Blur falloff function: "linear" or "cosine". Default: "linear"
219267

220-
## `raster_overscale`
268+
---
269+
270+
## raster_overscale
221271

222272
Raster overscale operation - generates tiles beyond the source's native resolution.
223273

@@ -227,16 +277,20 @@ Raster overscale operation - generates tiles beyond the source's native resoluti
227277
- *`level_max`: u8 (optional)* - The maximum zoom level to support. Defaults to 30. Requests above this level will not return tiles.
228278
- *`enable_climbing`: bool (optional)* - Enable tile climbing when the expected source tile doesn't exist. When true, the operation will search parent tiles at lower zoom levels until it finds an existing tile, then extract and upscale from there. Defaults to false.
229279

230-
## `raster_overview`
280+
---
231281

232-
Filter tiles by bounding box and/or zoom levels.
282+
## raster_overview
283+
284+
Generate lower-zoom overview tiles by downscaling from a base zoom level.
233285

234286
### Parameters
235287

236288
- *`level`: u8 (optional)* - use this zoom level to build the overview. Defaults to the maximum zoom level of the source.
237289
- *`tile_size`: u32 (optional)* - Size of the tiles in pixels. Defaults to 512.
238290

239-
## `vector_filter_layers`
291+
---
292+
293+
## vector_filter_layers
240294

241295
Filters vector tile layers based on a comma-separated list of layer names.
242296

@@ -245,7 +299,9 @@ Filters vector tile layers based on a comma-separated list of layer names.
245299
- **`filter`: String (required)** - Comma‑separated list of layer names that should be removed from the tiles, e.g.: filter="pois,ocean".
246300
- *`invert`: bool (optional)* - If set, inverts the filter logic (i.e., keeps only layers matching the filter).
247301

248-
## `vector_filter_properties`
302+
---
303+
304+
## vector_filter_properties
249305

250306
Filters properties based on a regular expressions.
251307

@@ -254,7 +310,9 @@ Filters properties based on a regular expressions.
254310
- **`regex`: String (required)** - A regular expression pattern that should match property names to be removed from all features. The property names contain the layer name as a prefix, e.g., `layer_name/property_name`, so an expression like `regex="^layer_name/"` will match all properties of that layer or `regex="/name_.*$"` will match all properties starting with `name_` in all layers.
255311
- *`invert`: bool (optional)* - If set, inverts the filter logic (i.e., keeps only properties matching the filter).
256312

257-
## `vector_update_properties`
313+
---
314+
315+
## vector_update_properties
258316

259317
Arguments for the `vector_update_properties` operation.
260318
This operation joins vector tile features with external tabular data (CSV/TSV)

0 commit comments

Comments
 (0)