feat: Remove redundant GeoJSON formats and return only mapped result for vector_with_kato
This commit is contained in:
@@ -289,15 +289,11 @@ paths:
|
||||
kept under a `rows` key. An empty collection is returned when the dataset
|
||||
has no geometry.
|
||||
|
||||
A `vector_with_kato` dataset is built from its observations. When it has
|
||||
its own (dissolved) geometry, the observations are taken to describe that
|
||||
whole geometry: a single Feature wraps it, and its properties nest the
|
||||
observations under a `data` object, keyed by KATO code (each KATO mapping
|
||||
to its district `name` and its own `data` map of date->value pairs).
|
||||
Otherwise one Feature is emitted per KATO, its
|
||||
boundary taken from the `districts` table and the per-year values nested
|
||||
under a `data` object (keyed by date) alongside `kato` and `name`; KATO
|
||||
codes with no matching district are skipped.
|
||||
A `vector_with_kato` dataset always ignores any geometry it carries and
|
||||
joins the `districts` table on KATO code: one Feature is emitted per KATO,
|
||||
its boundary taken from the matching district and the per-year observation
|
||||
values nested under a `data` object (keyed by date) alongside `kato` and
|
||||
`name`. KATO codes with no matching district are skipped.
|
||||
|
||||
Only `ready` datasets are served: a dataset still being processed
|
||||
returns 409. Other file types (e.g. `raster`) return 422.
|
||||
@@ -312,33 +308,6 @@ paths:
|
||||
"409": { $ref: "#/components/responses/Conflict" }
|
||||
"422": { $ref: "#/components/responses/ValidationError" }
|
||||
|
||||
/datasets/{id}.kato.geojson:
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/IdParam"
|
||||
get:
|
||||
tags: [Datasets]
|
||||
summary: Get a dataset as district-joined GeoJSON (vector_with_kato)
|
||||
description: |
|
||||
Like `/datasets/{id}.geojson`, but ignores any geometry the dataset
|
||||
carries and always joins the `districts` table on KATO code: one Feature
|
||||
is emitted per KATO, its boundary taken from the matching district and
|
||||
the per-year observation values nested under a `data` object (keyed by
|
||||
date) in the Feature's properties, alongside `kato` and `name`. KATO
|
||||
codes with no matching district are skipped.
|
||||
|
||||
Only `ready` datasets are served: a dataset still being processed
|
||||
returns 409. Other file types return 422.
|
||||
responses:
|
||||
"200":
|
||||
description: The dataset as a district-joined GeoJSON FeatureCollection
|
||||
content:
|
||||
application/geo+json:
|
||||
schema: { $ref: "#/components/schemas/GeoJSONFeatureCollection" }
|
||||
"400": { $ref: "#/components/responses/BadRequest" }
|
||||
"404": { $ref: "#/components/responses/NotFound" }
|
||||
"409": { $ref: "#/components/responses/Conflict" }
|
||||
"422": { $ref: "#/components/responses/ValidationError" }
|
||||
|
||||
/datasets/{id}/status:
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/IdParam"
|
||||
|
||||
Reference in New Issue
Block a user