GeoParquet source
GeoParquet stores features as a columnar table. A .parquet URL on a geojson source is all it takes: maplibre-yaml reads the file into the source, so layers, popups, classify:, the legend and fitTo behave exactly as for a .geojson file — and it reads only the columns the document uses. Click a district; zoom in past 11 to see the stations, which are read by view.
The complete document
Section titled “The complete document”# GeoParquet files as GeoJSON sources — YAML only. The .parquet file# name is the only hint; layers, popups, classify, the legend and fitTo work# as for a .geojson file, and only the columns this document uses are read.# Synthetic, public-domain data (a fictional sea area).type: mapid: geoparquet-sourceconfig: center: [10.2, 42.15] zoom: 8 mapStyle: "https://tiles.openfreemap.org/styles/positron" fitTo: { source: districts, padding: 24 }legend: title: District populationsources: districts: type: geojson url: /gallery-assets/cloud-native/districts.parquet points: type: geojson url: /gallery-assets/cloud-native/points.parquet load: { mode: viewport, minzoom: 11 }layers: - id: districts type: fill source: districts label: Population classify: field: population method: quantile classes: 4 palette: Blues paint: fill-opacity: 0.75 fill-outline-color: "#1d3557" interactive: click: popup: - h3: [{ property: name }] - p: [{ str: "Category: " }, { property: category }] - p: [{ str: "Population " }, { property: population }] - id: points type: circle source: points paint: circle-radius: 4 circle-color: ["match", ["get", "kind"], "well", "#e63946", "station", "#264653", "#2a9d8f"] circle-stroke-width: 1 circle-stroke-color: "#ffffff" legend: { label: "Stations (from zoom 11)", color: "#264653", shape: circle }What to notice
Section titled “What to notice”type: geojsonstays the MapLibre source type; the.parquetfile name tells maplibre-yaml to read it as GeoParquet. For a URL without the extension, addformat: geoparquet.- Only the columns this document references are read:
name,categoryandpopulationfrom the districts (the popup andclassify:),kindfrom the stations (the colour). Setcolumns:to choose yourself, orcolumns: all. districtsis read whole (the default,load: all), soclassify:computes its quantile classes from every district.pointsusesload: { mode: viewport, minzoom: 11 }: only the rows in view are read, using the file’sbboxcolumn and its location-sorted row groups, and re-read as the map moves. Below zoom 11 nothing is read. This needs a host with HTTP range requests (GitHub Pages, Netlify, S3, R2; notpython -m http.server).fitToframes the decoded districts.- Data: synthetic and public domain (a fictional sea area), generated by
scripts/fixtures/cloud-native.py.
More: GeoParquet — making a GeoParquet file, sizes, hosting, and what the map says when a file can’t be read.