feat: Remove geometry and properties from GET /datasets/{id} endpoint, new endpoint for download cog file
This commit is contained in:
@@ -8,9 +8,10 @@ info:
|
||||
vector_with_kato, raster).
|
||||
|
||||
Datasets are processed asynchronously after upload, dispatched by `file_type`:
|
||||
- `vector` — the attribute table is extracted into `properties`.
|
||||
- `raster` — converted to a Cloud-Optimized GeoTIFF; footprint `geometry`
|
||||
and `bbox` are derived from the raster extent.
|
||||
- `vector` — the attribute table is extracted and, with the geometry,
|
||||
assembled into the `.geojson` output.
|
||||
- `raster` — converted to a Cloud-Optimized GeoTIFF (served at
|
||||
`GET /datasets/{id}.cog`); `bbox` is derived from the raster extent.
|
||||
- `vector_with_kato` — columns are detected for selection; the client then
|
||||
submits a KATO/year mapping, unpivoted into observations.
|
||||
|
||||
@@ -254,7 +255,11 @@ paths:
|
||||
get:
|
||||
tags: [Datasets]
|
||||
summary: Get a dataset
|
||||
description: Full dataset, including geometry as GeoJSON and bbox for rasters.
|
||||
description: |
|
||||
Dataset metadata, plus `bbox` for rasters. The heavy `geometry` and
|
||||
`properties` fields are not included; fetch geometry via
|
||||
`GET /datasets/{id}.geojson` and a raster's COG via
|
||||
`GET /datasets/{id}.cog`.
|
||||
responses:
|
||||
"200":
|
||||
description: The dataset
|
||||
@@ -308,6 +313,29 @@ paths:
|
||||
"409": { $ref: "#/components/responses/Conflict" }
|
||||
"422": { $ref: "#/components/responses/ValidationError" }
|
||||
|
||||
/datasets/{id}.cog:
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/IdParam"
|
||||
get:
|
||||
tags: [Datasets]
|
||||
summary: Get a raster dataset's Cloud-Optimized GeoTIFF
|
||||
description: |
|
||||
Streams the raster dataset's Cloud-Optimized GeoTIFF (`image/tiff`),
|
||||
produced when a `raster` upload is converted.
|
||||
|
||||
Only `raster` datasets are served: other file types return 422, and a
|
||||
raster whose COG has not been produced yet returns 409.
|
||||
responses:
|
||||
"200":
|
||||
description: The Cloud-Optimized GeoTIFF
|
||||
content:
|
||||
image/tiff:
|
||||
schema: { type: string, format: binary }
|
||||
"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"
|
||||
@@ -668,13 +696,6 @@ components:
|
||||
format: int64
|
||||
content_type:
|
||||
type: string
|
||||
properties:
|
||||
type: [array, "null"]
|
||||
description: Extracted attribute table (plain vector); rows of key/value.
|
||||
items:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
meta:
|
||||
type: [object, "null"]
|
||||
description: Arbitrary user-supplied JSON.
|
||||
@@ -696,8 +717,6 @@ components:
|
||||
parse_error:
|
||||
type: [string, "null"]
|
||||
description: Failure reason when status is `failed`.
|
||||
geometry:
|
||||
$ref: "#/components/schemas/GeoJSONGeometry"
|
||||
bbox:
|
||||
type: array
|
||||
description: "[minX, minY, maxX, maxY]; present only for rasters."
|
||||
|
||||
Reference in New Issue
Block a user