Get risk map API - mapserv.riskmap
Note
This document has been machine translated.
The Risk Map Get API retrieves the risk contour polygons of a risk map.
The execution method is JSON-RPC v2.0
The following is a list of common specifications for risk map data.
Common specifications for risk map data
A risk map is a time attribute (start and end dates and times) and a spatial attribute (polygons), a set of records consisting of risk values observed (or predicted) in that time and space.
A risk map consists of the following columns
| column name | data type |
|---|---|
| start_datetime | timestamp with time zone |
| end_datetime | timestamp with time zone |
| geom | geometry |
| risk | integer |
-
start_datetime / end_datetime: time attribute
The start and end date and time are recorded in 5-minute increments.
-
geom: Spatial attribute
The geometry of the corresponding mesh is recorded in either the standard regional mesh (primary to tertiary mesh) or the segmented regional mesh (one-half regional mesh and one-quarter regional mesh). Specify which granularity of mesh to use when retrieving the risk map.
-
risk: Risk value
The rules obtained from the correlation rule extraction are applied to the real data, When you apply a rule obtained by correlation rule extraction to real data, you will get some value for a certain time and place based on the rule. In EvWH, we can obtain the likelihood of traffic congestion from precipitation, to extract rules to obtain the dispersion of air pollutants from temperature and humidity, The obtained values are called “risk values”. Risk values are defined on a scale of 0 to 10 on an 11-point scale.
Endpoint
https://<api-server-endpoint>/api/v1/evwhapi/jsonrpc
Request Example
{
"jsonrpc": "2.0",
"method": "mapserv.riskmap",
"params": {
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[
[139.25, 35.25], [139.25, 35.5], [139.625, 35.5],
[139.625, 35.25], [139.25, 35.25]
]]
},
"properties": {
"start_datetime": "2018-09-15 00:00:00",
"end_datetime": "2018-09-15 01:00:00",
"themes": ["riskmap_fujisawa"]
}
},
"id": "mapserv_riskmap"
}
Parameters
Request parameters are in GeoJSON Feature format.
Geometry is the spatial range to be searched. Type can be Polygon, Line, Point, or a collection of these.
Properties is a list of the following parameters.
| parameter name | data type | content | default value |
|---|---|---|---|
| start_datetime | string | Datetime ("YYYY-MM-DD hh:mm:ss+TZ") | required |
| end_datetime | string | datetime ("YYYY-MM-DD hh:mm:ss+TZ") | start_datetime + 1秒 |
| themes | [string, [string,...] | Target Risk Map | required |
| target_theme_mesh_degree | int | Mesh granularity of target risk map | Options (1~5) |
Output Samples
Return value
Returns a GeoJSON (FeatureCollection) format.
In Feature.properties corresponding to each polygon, theme is the name of the target risk map, risk is the risk value, and datetime is the date and time.
risk and datetime.
Description.
Get risk contour polygon data of a risk map.
- Returns the risk contour polygon data in the risk map(s) specified in
themesfor the period specified instart_datetimeandend_datetime, which intersect the area specified in the geometry part of GeoJSON. - If the period covered, the number of risk maps, or the geometry part is large, a very large GeoJSON may be returned.
- The “Get Risk Map API” returns only the risk values contained in the risk column except for the spatio-temporal attributes. If you want to retrieve other attribute values, use the “Prediction Map Retrieval API”.
- If the request includes target_theme_mesh_degree, the risk map for the most recent time after the time specified in start_datetime will be returned.