feat: cache geojson data for vector files

This commit is contained in:
2026-07-01 17:40:25 +05:00
parent ec8a014e82
commit d5c291fb9b
6 changed files with 235 additions and 69 deletions

View File

@@ -217,6 +217,11 @@ type Dataset struct {
// Geometry is the dataset's spatial geometry, serialized as GeoJSON.
// Nullable; populated from the file's spatial data.
Geometry json.RawMessage `json:"geometry"`
// GeoJSON is the pre-assembled GeoJSON FeatureCollection served by the
// .geojson endpoint. It is generated and persisted at processing time for
// vector and vector_with_kato datasets. Nullable; not exposed on the dataset
// response (served only by the .geojson endpoint).
GeoJSON json.RawMessage `json:"-"`
// BBox is the axis-aligned bounding box [minX, minY, maxX, maxY] derived
// from the geometry. Included in responses only for raster datasets.
BBox []float64 `json:"bbox,omitempty"`