RFC: tile pipelines as "virtual tile sources" #26
Replies: 3 comments 3 replies
-
merging different sources looks important to me, so far i had to convert to tar, use the editing vectors and rasters is what |
Beta Was this translation helpful? Give feedback.
-
After much experimentation, I have reinvented the wheel! \o/ But seriously, when defining a pipeline, you basically have two types of lists. A list of things like multiple values or multiple tile sources, and a list of operations that define a pipeline. In the first case (list of values/sources) it would be great to have a notation like: VersaTiles PipelineVersaTiles Pipeline is a robust toolkit designed for efficiently generating and processing large volumes of tiles, from thousands to millions. It leverages multithreading to stream, process, and transform tiles from one or more sources in parallel, either storing them in a new tile container or delivering them in real-time through a server: # save the processed tiles in a container:
versatiles convert pipeline.vpl result.versatiles
# serve the tiles directy via the server:
versatiles serve pipeline.vpl Defining a pipelineTo define a pipeline, create a .vpl file and descibe the pipeline using the VersaTiles Pipeline Language (VPL). Pipelines always begin with a read operation, optionally followed by one or more transform operations, separated by the pipe symbol ( Example:
Operation FormatEach operation follows this structure:
For read operations that combine multiple sources, use a comma-separated list within square brackets: Example:
READ operationsget_dummy_tilesGenerates mocked tiles. Parameters:
get_overlayedOverlays multiple tile sources, using the tile from the first source that provides it. Sources:
get_tilesReads a tile source, such as a VersaTiles container. Parameters:
TRANSFORM operationsvectortiles_update_propertiesUpdates properties of vector tile features using data from an external source (e.g., CSV file). Matches features based on an ID field. Parameters:
|
Beta Was this translation helpful? Give feedback.
-
Yesterday, I had a hunch this could be useful and switched our base tilesets into a .vpl file. I still need to do some more testing, but it seems great so far. Now I can pretend our three base sources are actually one file, and it greatly helps with version control as well. Now I don't have to keep around an old osm file just in case some older json style file someone has cached still refers to it - rather I can just replace the file and only keep the old .vpl file around which now refers to the new one automatically, so I can name my tilesets whatever I want while keeping the file names server side as simple as possible. Very happy 😄 |
Beta Was this translation helpful? Give feedback.
-
Introduction
VersaTiles should support "virtual tile sources" defined via YAML, allowing users to create flexible and powerful tile processing pipelines. In addition to standard container formats such as
*.versatiles
,*.mbtiles
,*.pmtiles
, ... virtual tile sources*.yaml
will allow for dynamic tile processing and transformation workflows. These pipelines can be used as virtual tile sources for tile conversion, but can also be used as a source for serving map tiles.Use cases
Example 1: Appending new properties to POI features
This example shows how to open a vector tile containing Points of Interest (POIs) and append new properties to each POI feature by matching the 'id' field from a CSV file.
Example 2: Adding a GeoJSON as a layer to vector tiles
This example shows how to read vector tiles from
europe.versatiles
and add a new layer called "overlay" containing geometries fromoverlay.geojson
.Specifications
Supported operations
Pipeline Definition
A pipeline is defined as a sequence of operations, where each operation specifies:
run
).args
).source
) - only for Composers.Documentation
If you run
versatiles help pipeline
you get a documentation of all operation, e.g.:/cc @yetzt
Beta Was this translation helpful? Give feedback.
All reactions