Skip to main content
Skip table of contents

Ad-hoc Vector Tile Rendering from DWH Datasets

Overview

CleverMaps now supports ad-hoc rendering of vector tiles directly from DWH datasets containing geospatial polygon or line geometries. This feature enables users to upload datasets with geometry data and instantly render vector tiles for visualization, without the need for pre-prepared Mapbox tilesets. This enhancement streamlines the workflow for displaying custom geographic data and increases flexibility for spatial analysis.

image-20251125-101713.png

Key Benefits

  • No need for Mapbox tileset preparation: Vector tiles are rendered on-the-fly from your DWH dataset.

  • Faster iteration: Upload and visualize new or updated geospatial datasets immediately. No need to manage tiles and dwh data separately.

  • Secure access: Tiles are protected by CleverMaps project authorization (JWT Bearer token).

  • Incremental updates: Tiles are recalculated when the dataset is updated, supporting incremental data refresh.

Data Model

The following diagram illustrates the data model:

  • geometryPoint dataset: Contains point-based features (e.g., locations, addresses).

  • geometryPolygon dataset: Contains polygon-based features (e.g., administrative boundaries), derived from point data or uploaded directly.

  • Vector tile dataset: References the geometryPolygon dataset and serves vector tiles for web mapping.

image-20251125-102846.png

g applications.

How It Works

A new API endpoint allows you to request vector tiles directly from a DWH dataset:

CODE
GET /projects/{projectId}/dwh/{dwhClusterId}/tiles/{datasetName}/{z}/{x}/{y}.vector.pbf
  • Renders vector tiles from geometryPolygon or geometryLine datasets with a geometry property.

  • Tiles are rendered on-the-fly and cached in Redis for performance.

  • No geometry generalization is performed (see limitations).

  • If a tile is empty, a 404 response is returned.

Example Metadata

To use this feature, reference the new endpoint in your vector tile dataset metadata:

CODE
{
    "name": "zsjd_vt",
    "type": "dataset",
    "title": "Vector tiles for the basic residential units - parts",
    "ref": {
        "type": "vt",
        "urlTemplate": "https://secure.clevermaps.io/rest/projects/{projectId}/dwh/{dwhClusterId}/tiles/zsj_d_dwh/{z}/{x}/{y}.vector.pbf",
        "zoom": {
            "min": 10,
            "optimal": 15,
            "max": 18
        }
    }
}

Comparison with Previous Approach

Previously, CleverMaps supported only vector tiles prepared in Mapbox. The workflow required:

  • Preparing and uploading a tileset to Mapbox.

  • Creating a vector tile dataset referencing the Mapbox URL and public token.

  • Creating a dwh dataset containing datataset data (except geometry)

  • Managing Mapbox account

With the new feature:

  • No Mapbox account or pre-processing is needed.

  • Tiles are generated directly from your DWH data.

  • No strict tile size limit (Mapbox: 500kB/tile).

  • Authorization is managed by CleverMaps user roles, not public tokens.

For reference, see the previous workflow:
Tutorial 10: Importing custom geographic data into the CleverMaps

Limitations

  1. No geometry generalization: Large geometries may produce large tiles. Preparing tilesets in Mabox can be more efficient solution for huge datasets.

  2. No strict tile size limit: Unlike Mapbox (500kB), CleverMaps does not enforce a hard limit, which can be advantageous for large features.

  3. Tiles are recalculated on dataset update: Incremental updates are supported.

  4. Secure access: Only accessible with JWT Bearer token; authorization is based on CleverMaps project user roles (no public tokens).

See Also

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.