-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Motivation
The current GeoJSON/JSONL endpoint (POST /tiles with Accept: application/jsonl) returns only basic GeoJSON FeatureCollections without tile-level metadata. This limits automated processing capabilities:
- Cannot determine which mapget tile a JSONL line belongs to
- No error information for automated retry logic
- Missing timestamp/TTL for cache validation
Proposed Changes
Enhance the JSONL response format to include additional metadata per tile:
| Field | Type | Description |
|---|---|---|
mapgetTileId |
integer | The mapget tile ID (64-bit decimal) |
mapgetLayerId |
string | Layer identifier within the map |
mapId |
string | Map identifier |
idPrefix |
object | Common ID parts shared by all features (optional) |
timestamp |
string | ISO 8601 timestamp when tile was created |
ttl |
integer | Time-to-live in milliseconds (optional) |
error |
object | Error info if tile creation failed (optional) |
error.code |
integer | Numeric error code (HTTP status, DB error, etc.) |
error.message |
string | Human-readable error message |
Note: Using mapgetTileId and mapgetLayerId prefixes to avoid confusion with map format-specific terms.
Implementation
- Add
errorCodefield toTileLayerclass - Enhance
TileFeatureLayer::toJson()to include all metadata - Update Python bindings
- Update documentation
- Add unit tests
Metadata
Metadata
Assignees
Labels
No labels