There are two kinds of scripting:
This folder has an example of a tileset scripting design written in the Starlark language, a subset of Python.
The program main.go will execute tileset_definition.star against dummy data. Control which features are assigned to which layers by defining functions in the file:
def roads_filter(z,f):
if z < 2:
return f["properties"]["highway"] == "motorway"
else:
return f["properties"]["highway"]
Client scripting. Functional Lisp-inside-JSON. Must run on a unique environment (GL), not turing-complete; limited to built-in functions, can require preprocessor.
Client scripting. Runs in WebGL. Variables, inline shader code, embeddable JavaScript expressions.
(disclaimer: i designed this)
Client scripting. Everything is TypeScript, turing complete, variables and parameterization, runs 100% on CPU.
Declarative, custom textual format for creating PostgreSQL tables. geometrytype-based selection, key wildcards.
Declarative YAML for creating PostgreSQL tables.
Declarative JSON format for Simple Features like GeoJSON from OSM.
(disclaimer: i designed this)
Declarative YAML specification for transforming OSM to Simple Features. Can embed subset of SQL inside where expressions for layer definitions:
where:
- amenity IN ('university','school','library','fuel','hospital','fire_station','police','townhall')
True tileset scripting. Write Lua functions that are executed against OSM features to define tileset features. Depends on Lua C runtime.
Declarative YAML for transforming OSM into tileset features.