map0

Data sources

GeoParquet

GeoParquet stores vector data in a compressed, columnar file. map0 downloads the file, decodes it in the browser and displays it like GeoJSON. The 4,522 trees below occupy 121 KB as GeoParquet, compared with 2.6 MB as uncompressed GeoJSON.

Try it: open the network tab and reload the page. The tree dataset for Vienna’s first district loads as a single 121 KB file. Hover over a tree to see its species or click for its attributes. “Zoom to layer” on the district boundaries uses the extent stored in the file’s metadata.

Configuration

A geoparquet layer uses url to reference a file. Its styling, clustering, popup and hover options match those of a geojson layer.

geoparquet.map0.json
{
  "$schema": "https://map0.net/schema/v1.json",
  "version": 1,
  "meta": { "title": "GeoParquet" },
  "map": { "center": [16.3695, 48.2095], "zoom": 14 },
  "basemaps": [
    {
      "id": "grau",
      "title": "Grey",
      "type": "raster",
      "url": "https://mapsneu.wien.gv.at/basemap/bmapgrau/normal/google3857/{z}/{y}/{x}.png",
      "attribution": "© basemap.at",
      "default": true
    }
  ],
  "layers": [
    {
      "id": "baumkataster",
      "type": "geoparquet",
      "title": "Tree cadastre, 1st district",
      "url": "/data/vienna-trees-1010.parquet",
      "style": {
        "circle-color": "#15803d",
        "circle-radius": 4.5,
        "circle-stroke-color": "#ffffff",
        "circle-stroke-width": 1
      },
      "hover": { "content": "{{GATTUNG_ART}}" },
      "popup": {
        "title": "{{GATTUNG_ART}}",
        "fields": [
          { "key": "PFLANZJAHR_TXT", "label": "Planted" },
          { "key": "BAUMHOEHE_TXT", "label": "Height" },
          { "key": "STAMMUMFANG_TXT", "label": "Trunk circumference" },
          { "key": "KRONENDURCHMESSER_TXT", "label": "Crown diameter" },
          { "key": "OBJEKT_STRASSE", "label": "Location" }
        ]
      },
      "attribution": "Stadt Wien, data.wien.gv.at"
    },
    {
      "id": "bezirksgrenzen",
      "type": "geoparquet",
      "title": "District boundaries",
      "url": "/data/vienna-districts.parquet",
      "style": {
        "fill-color": "#7c3aed",
        "fill-opacity": 0.04,
        "line-color": "#7c3aed",
        "line-width": 1.5
      },
      "popup": { "title": "{{NAMEK}}", "fields": [{ "key": "BEZNR", "label": "District no." }] },
      "attribution": "Stadt Wien, data.wien.gv.at"
    }
  ]
}

What this demo shows

For the tree dataset on this page, the sizes are 2.6 MB as uncompressed GeoJSON, 215 KB as gzipped GeoJSON and 121 KB as GeoParquet. GeoParquet compresses data within the file, so these savings also apply on static storage without HTTP compression.

Coordinate systems and file size. map0 reads the coordinate system from the file’s metadata. It uses WGS84 directly and transforms other supported systems with proj4 when loading. Built-in definitions include Austrian GK and ETRS89 UTM. You can supply a crs setting if the file’s definition cannot be resolved. The entire file is downloaded and decoded, so loading time and memory use depend on its size and geometry complexity. For large datasets, vector tiles such as PMTiles allow loading by map view.

Producing GeoParquet

GDAL with Parquet support and DuckDB with the spatial extension can create GeoParquet files. The examples below include the geometry metadata map0 requires. Converting to WGS84 beforehand is optional when map0 supports the source CRS:

GDAL
ogr2ogr -f Parquet trees.parquet trees.gpkg -t_srs EPSG:4326
DuckDB
INSTALL spatial; LOAD spatial;
COPY (SELECT * FROM ST_Read('trees.geojson'))
  TO 'trees.parquet' (FORMAT PARQUET, COMPRESSION SNAPPY);

The files on this page were converted from the City of Vienna’s open-data WFS using DuckDB. District boundaries were simplified with a tolerance of about 20 m to reduce file size. map0 supports Snappy, gzip, brotli, zstd and lz4 compression. Files without geo metadata are rejected.

When to use GeoParquet

GeoParquet is useful for publishing a complete vector dataset as one file on a web server or object storage. It can reduce download size compared with GeoJSON while keeping geometries and attributes together. If your data processing tools already produce GeoParquet, you can use that file directly. For datasets too large to load in full, consider vector tiles such as PMTiles.