Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement naive cache solution #17

Merged
merged 14 commits into from
Jan 3, 2022
34 changes: 0 additions & 34 deletions .vscode/launch.json

This file was deleted.

90 changes: 61 additions & 29 deletions openapi3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/createGpkgJobResponse'
'400':
oneOf:
AnguIar marked this conversation as resolved.
Show resolved Hide resolved
- $ref: '#/components/schemas/createGpkgJobResponse'
- $ref: '#/components/schemas/naiveCacheJobResponse'
400:
description: Bad Request
content:
application/json:
Expand Down Expand Up @@ -57,27 +59,17 @@ components:
type: string
format: uuid
description: ID as the primary key from the Raster Catalog
packageName:
type: string
description: The name of the desired GPKG (no need for .gpkg extension)
pattern: ^[\/\w\-. ]+$
maxLength: 255
bbox:
type: array
items:
type: number
minItems: 4
maxItems: 4
description: >-
Bounding box corners (lower left, upper right)=[minx,miny,maxx,maxy]
in crs units as array
$ref: '#/components/schemas/BBOX'
targetResolution:
type: number
description: >-
The target resolution in which the tiles will be created - DEGREE to
PIXEL
callbackURL:
type: string
type: array
items:
type: string
description: The callback URL to notify the process if finished
crs:
$ref: '#/components/schemas/CRS'
Expand All @@ -91,31 +83,63 @@ components:
- bbox
- targetResolution
- callbackURL
- packageName
example:
dbId: ef03ca54-c68e-4ca8-8432-50ae5ad7a7f8
packageName: myPackage
bbox:
- 34.811938017107494
- 31.95475033759175
- 34.82237261707599
- 31.96426962177354
targetResolution: 0.0000429153442382812
callbackURL: http://example.getmap.com/callback
crs: EPSG:4326
bbox: [34.811938017107494, 31.95475033759175, 34.82237261707599, 31.96426962177354]
targetResolution: 4.29153442382812e-05
callbackURL: ['http://example.getmap.com/callback', 'http://example.getmap.com/callback2']
crs: 'EPSG:4326'
priority: 0
createGpkgJobResponse:
type: object
properties:
jobId:
type: string
format: uuid
taskId:
taskIds:
type: array
items:
type: string
format: uuid
required:
- jobId
- taskIds

naiveCacheJobResponse:
type: object
properties:
fileUri:
type: string
expirationTime:
type: string
format: date
fileSize:
type: number
dbId:
type: string
format: uuid
packageName:
type: string
bbox:
$ref: '#/components/schemas/BBOX'
targetResolution:
type: number
requestId:
type: string
success:
type: boolean
errorReason:
type: string
required:
- jobId
- taskId
- fileUri
- expirationTime
- fileSize
- dbId
- packageName
- bbox
- targetResolution
- requestId
- success
error:
type: object
required:
Expand All @@ -138,3 +162,11 @@ components:
description: List of supported
enum:
- EPSG:4326

BBOX:
type: array
items:
type: number
minItems: 4
maxItems: 4
description: Bounding box corners (lower left, upper right)=[minx,miny,maxx,maxy] in crs units as array
Loading