deseasion.backend.resources.geo_data module

class deseasion.backend.resources.geo_data.DataAPI

Bases: Resource

endpoint = 'dataapi'
get(data_id)

Get a data from its id.

Parameters:

data_id (int) – The id of the data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to access this data.

Status 404:

The data doesn’t exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class deseasion.backend.resources.geo_data.DataAttributeAPI

Bases: Resource

endpoint = 'dataattributeapi'
get(attribute_id)

Get the details of an attribute of a geo-data.

The details contain the name of the attribute, its type and some statistics about its values.

Parameters:

attribute_id (int) – The id of the data attribute.

Query bool values:

Return the values of the attribute. Default: False.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to access the geo-data attribute.

Status 404:

The geo-data attribute doesn’t exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class deseasion.backend.resources.geo_data.DataDownloadAPI

Bases: Resource

endpoint = 'datadownloadapi'
get(data_id)

Return the data in desired format.

Parameters:

data_id (int) – The id of the data to download.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to access the data.

Status 404:

The data doesn’t exist.

Status 415:

Output format is not supported.

Status 500:

There was an error with the geometry while creating the file.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class deseasion.backend.resources.geo_data.DataListAPI

Bases: Resource

endpoint = 'datalistapi'
get()

Get the list of all the data for the user.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

No user logged in.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

parse_types(args) set[str]
class deseasion.backend.resources.geo_data.FeatureAPI

Bases: Resource

endpoint = 'featureapi'
get(feature_id)

Return the details of the feature.

Parameters:

feature_id (int) – The id of the feature.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to access the geo-data with this feature.

Status 404:

The geo-data feature doesn’t exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class deseasion.backend.resources.geo_data.FeatureInputsAPI

Bases: Resource

endpoint = 'featureinputsapi'
get(feature_id, data_id)

Return the inputs of the feature in specified data.

Parameters:
  • feature_id (int) – The id of the feature.

  • data_id (int) – The id of the input data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to access the geo-data with this feature.

Status 404:

The geo-data feature or data doesn’t exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class deseasion.backend.resources.geo_data.FeatureOutputsAPI

Bases: Resource

endpoint = 'featureoutputsapi'
get(feature_id, data_id)

Return the outputs of the feature in specified data.

Parameters:
  • feature_id (int) – The id of the feature.

  • data_id (int) – The id of the output data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to access the geo-data with this feature.

Status 404:

The geo-data feature or data doesn’t exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class deseasion.backend.resources.geo_data.GeoDataAPI

Bases: Resource

delete(geo_data_id)

Delete a geodata and its features.

Parameters:

geo_data_id (int) – The id of the geo-data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 400:

The geo-data is used as input in other data and cannot be deleted.

Status 403:

The user is not allowed to delete the geo-data.

Status 404:

The geo-data doesn’t exist.

endpoint = 'geodataapi'
get(geo_data_id)

Get a geo-data from its id.

Parameters:

geo_data_id (int) – The id of the geo-data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to access this geo-data.

Status 404:

The geo-data doesn’t exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'DELETE', 'GET', 'PUT'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

put(geo_data_id)

Update an existing geo-data.

Parameters:

geo_data_id (int) – The id of the geo-data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to modify the geo-data.

Status 404:

The geo-data doesn’t exist.

class deseasion.backend.resources.geo_data.GeoDataAccessAPI

Bases: Resource

endpoint = 'geodataaccessapi'
get(geo_data_id)

Return the list of permissions for the geo-data.

The user must be the owner of the geodata.

Parameters:

geo_data_id (int) – The id of the data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not the owner of the data.

Status 404:

The geo-data doesn’t exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'PUT'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

put(geo_data_id)

Update the list of permissions for the geo-data.

The user must be the owner of the geodata.

Parameters:

geo_data_id (int) – The id of the data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not the owner of the data.

Status 404:

The geo-data doesn’t exist.

class deseasion.backend.resources.geo_data.GeoDataListAPI

Bases: Resource

endpoint = 'geodatalistapi'
get()

Get the list of all the geo-data for the user.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

No user logged in.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class deseasion.backend.resources.geo_data.GeoDataUploadAPI

Bases: Resource

endpoint = 'geodatauploadapi'
mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

post()

Create a new geo-data from the uploaded files.

The uploaded file can either be a .zip file containing all the required shapefile files, the list of shapefile files or a single file containing vector geodata.

Form file:

The list of files.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to create geo-data.

Status 415:

There is an error in the uploaded file.

class deseasion.backend.resources.geo_data.GeoDataUploadRasterAPI

Bases: Resource

endpoint = 'geodatauploadrasterapi'
mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

post()

Create a new vectorized geo-data from the uploaded raster file.

The raster data is reclassified using the classes given, to group multiple values together and transform the raster file in vector geometries.

For example, classes of [[0, 10, 5], [10, 100, 50]] would assign the value 5 to all the raster cells in [0, 10[, the value 50 to all the cells in [10, 100[, and 0 or 100 to the cells outside that range.

Form file:

The raster file.

Form classes:

The classes to reclassify the raster values (list [[low, high, value], ...]).

Form start:

The starting value for classes creation (if classes not provided).

Form step:

The step value for classes creation (if classes not provided).

Form stop:

The stop value for classes creation (if classes not provided).

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to create geo-data.

Status 415:

There is an error in the uploaded file.

class deseasion.backend.resources.geo_data.GeoDataVectorTileAPI

Bases: Resource

endpoint = 'geodatavectortileapi'
get(geo_data_id, z, x, y)

Return a Mapbox Vector Tile of the geo-data.

Parameters:
  • geo_data_id (int) – The id of the geo-data.

  • z (int) – The tile zoom level.

  • x (int) – The tile x index.

  • y (int) – The tile y index.

Query str property:

The name of the property to return as the value attribute. None by default.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to access this geo-data.

Status 404:

The geo-data doesn’t exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class deseasion.backend.resources.geo_data.GlobalDataAPI

Bases: Resource

delete(data_id)

Delete a global data.

Parameters:

data_id (int) – The id of the global -data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 400:

The global data is used as input in other data and cannot be deleted.

Status 403:

The user is not allowed to delete the global data.

Status 404:

The global data doesn’t exist.

endpoint = 'globaldataapi'
get(data_id)

Get a global data from its id.

Parameters:

data_id (int) – The id of the global data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to access this global data.

Status 404:

The global data doesn’t exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'DELETE', 'GET', 'PUT'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

put(data_id)

Update an existing global data.

Parameters:

data_id (int) – The id of the global data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to modify the global data.

Status 404:

The global data doesn’t exist.

class deseasion.backend.resources.geo_data.GlobalDataAccessAPI

Bases: Resource

endpoint = 'globaldataaccessapi'
get(data_id)

Return the list of permissions for the global data.

The user must be the owner of the global data.

Parameters:

data_id (int) – The id of the data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not the owner of the data.

Status 404:

The global data doesn’t exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'PUT'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

put(data_id)

Update the list of permissions for the global data.

The user must be the owner of the global data.

Parameters:

data_id (int) – The id of the data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not the owner of the data.

Status 404:

The global data doesn’t exist.

class deseasion.backend.resources.geo_data.GlobalDataListAPI

Bases: Resource

endpoint = 'globaldatalistapi'
get()

Get the list of all the global data for the user.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

No user logged in.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

post()

Create an existing global data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to create global data.

class deseasion.backend.resources.geo_data.StreamDataListAPI

Bases: Resource

endpoint = 'streamdatalistapi'
get()

Get the list of all the geo-data stream for the user.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

No user logged in.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class deseasion.backend.resources.geo_data.StreamGeoDataAPI

Bases: Resource

delete(stream_geo_data_id)

Delete a geodata stream.

Parameters:

stream_geo_data_id (int) – The id of the geo-data stream.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to delete the geo-data stream.

Status 404:

The geo-data stream doesn’t exist.

endpoint = 'streamgeodataapi'
get(stream_geo_data_id)

Get a geo-data stream from its id.

Parameters:

stream_geo_data_id (int) – The id of the geo-data stream.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to access this geo-data stream.

Status 404:

The geo-data stream doesn’t exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'DELETE', 'GET', 'PUT'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

put(stream_geo_data_id)

Update an existing geo-data stream.

Parameters:

stream_geo_data_id (int) – The id of the geo-data stream.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to modify the geo-data stream.

Status 404:

The geo-data stream doesn’t exist.

class deseasion.backend.resources.geo_data.StreamGeoDataAccessAPI

Bases: Resource

endpoint = 'streamgeodataaccessapi'
get(stream_geo_data_id)

Return the list of permissions for the geo-data stream.

The user must be the owner of the geodata stream.

Parameters:

stream_geo_data_id (int) – The id of the data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not the owner of the geodata stream.

Status 404:

The geo-data stream doesn’t exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'PUT'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

put(stream_geo_data_id)

Update the list of permissions for the geo-data.

The user must be the owner of the geodata stream.

Parameters:

stream_geo_data_id (int) – The id of the data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not the owner of the geodata stream.

Status 404:

The geo-data stream doesn’t exist.

class deseasion.backend.resources.geo_data.StreamGeoDataUpdateAPI

Bases: Resource

endpoint = 'streamgeodataupdateapi'
mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

post(stream_geo_data_id)

Update features preview of an existing geo-data stream.

Parameters:

stream_geo_data_id (int) – The id of the geo-data stream.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 400:

The stream could not be retrieved with given parameters.

Status 403:

The user is not allowed to modify the geo-data stream.

Status 404:

The geo-data stream doesn’t exist.

class deseasion.backend.resources.geo_data.WFSGeoDataUploadAPI

Bases: Resource

endpoint = 'wfsgeodatauploadapi'
mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

post()

Create a new geo-data stream.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 400:

The stream could not be retrieved with given parameters.

Status 403:

The user is not allowed to create geo-data stream.

class deseasion.backend.resources.geo_data.WMSGeoDataUploadAPI

Bases: Resource

endpoint = 'wmsgeodatauploadapi'
mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

post()

Create a new geo-data stream.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 400:

The stream could not be retrieved with given parameters.

Status 403:

The user is not allowed to create geo-data stream.