Click here for Swagger - Interactive API explorer
To execute calls the service input your api-key by clicking the "Authorize" button in Swagger
Example: https://dmigw.govcloud.dk/v2/lightningdata/collections/observation/items?api-key=<api-key>
Description: Will return up to 1000 (the default limit) lightning triangulations
Example: https://dmigw.govcloud.dk/v2/lightningdata/collections/station/items?api-key=<api-key>
Description: Will return up to 1000 (the default limit) stations
Example: https://dmigw.govcloud.dk/v2/lightningdata/collections/sensordata/items?api-key=<api-key>
Description: Will return up to 1000 (the default limit) sensor observations
The collection endpoints support a number of query parameters to filter or sort data. Make sure to read the query primer to make use of the below query parameters.
{
"type": "FeatureCollection",
"features": [
{
"geometry": {
"coordinates": [
-0.0195,
51.764
],
"type": "Point"
},
"id": "gcpyrx16261112394200001-39",
"type": "Feature",
"properties": {
"amp": -3.9,
"created": "2022-03-29T07:39:11.126140Z",
"observed": "2021-07-12T17:33:59.420000Z",
"sensors": "1,20,21,42,60",
"strokes": 1.0,
"type": 0.0
}
}
],
"timeStamp": "2023-10-26T09:26:30Z",
"numberReturned": 1,
"links": [
{
"href": "https://dmigw.govcloud.dk/v2/lightningdata/collections/observation/items?limit=1",
"rel": "self",
"type": "application/geo+json",
"title": "This document"
},
{
"href": "https://dmigw.govcloud.dk/v2/lightningdata/collections/observation/items?limit=1&offset=1",
"rel": "next",
"type": "application/geo+json",
"title": "Next set of results"
}
]
}
Example: https://dmigw.govcloud.dk/v2/lightningdata/collections
Description: Will return all available collections in the API. Available collections:
limit |
Specify a maximum number of objects (e.g. observations) you want to be returned. If a limit is not specified, the default limit is 1000. If more than 300000 objects are needed then use either the offset to request the next set of observations or download the data. Please be advised that this is a "maximum" and the result size could be less than what is requested Max possible limit: 300000 is the maximum limit you can request Example: Returns a maximum of 100 objects |
offset |
Specify the number of objects that should be skipped before returning matching objects. Default: 0. Max possible offset: 1.000.000 Using the limit and the offset parameters, a client can page through the objects returned - page size is set by the limit parameter. This will only work up to the maximum possible offset. If datasets larger than maximum limit plus maximum offset are required then data should be retrieved using the download service or by splitting requests by the datetime parameter. Example: Returns a maximum of 100 objects skipping the first 1000 |
datetime |
Narrow the search to a date range where both ends of the range are inclusive or a specific date. The range can be open on one side. If that is the case simply use ".." (double-dot) in stead of the an actual date for the open side. If only one date is supplied, then only exactly matching dates will be included. If both sides of the range are open, simply omit the datetime parameter. The plus sign "+" must be URL encoded: Danish summer time is UTC+2 (GMT+2) You can read more about how to deal with the status and the datetime parameter in the context of station here. Examples: Returns observations within the dates UTC 2018-02-12 at midnight and UTC 2018-03-18 at midnight. Both dates are inclusive.
Returns observations within the dates 2019-01-01 at midnight and 2020-01-01 at midnight in Danish summer timezone. Both dates are inclusive.
Returns observations from the date 2019-01-01 at midnight (Danish summer timezone) and after
Returns observations before or matching the date 2019-01-01 at midnight (Danish summer timezone).
Returns observations matching the date 2019-01-01 at midnight (Danish summer timezone)
Returns stations having the status "Active" at some time in the month of November 2020 (but not necessarily the whole month). |
type |
Filter observations by type Can only be used for the observation collection Available type values can be found here Example: Returns observations having type 1 |
bbox |
Narrow the search to only include objects within the specified bounding box. A bounding box (usually shortened to bbox) is an area defined by two longitudes and two latitudes, where:
They follow the standard format of: bbox = Southwesterly point (lon,lat) followed by northeasterly point (lon, lat) This bbox tool may be useful. Please use a decimal point as the decimal separator, e.g. 1.99 (and not 1,99) Examples: Returns observations within the bounding box having the Southwesterly point of 7.0, 54.0 and northeasterly point of 16.0, 58.0 (which basically covers the area of Denmark)
Returns observations within the bounding box having the Southwesterly point of 8.351697,55.421038 and northeasterly point of 8.542584,55.511345 (which basically covers the area of the city of Esbjerg in Denmark) |
bbox-crs |
Specifies the coordinate reference system of the bbox parameter. This service only support the CRS84 coordinate reference system. Example: Returns observations within the bounding box having the Southwesterly point of 7.0, 54.0 and northeasterly point of 16.0, 58.0 (which basically covers the area of Denmark) using the CRS84 coordinate reference system |
period |
Can only be used for the observation and sensordata collections. Most users will combine the "period" filtering with other query filters such as a specific bbox or a specific station. Some intervals will need some adjustment depending on the context and in some edge cases, e.g.: subtracting a month from 31th March will result in an invalid date 31th February, hence it will be adjusted to 28th/29th February respectively. Available values:
Examples: Returns the latest observation (ONLY ONE)
Returns the latest observations within the last 10 minutes.
Returns the latest observation for the station having the stationId 20077. |
sortorder |
Sorts returned objects. Asking for results to be sorted should only be done when it is needed - responses are generally faster when asking for results with no sorting. Only for the observationandsensordatacollections sortorder=observed,DESC
Only for the station collection sortorder=lastHeartbeat,DESC Example: Returns the response sorted by the observed time in descending order for the observation collection
Returns the response sorted by the received heartbeat-timestamp in descending order |
status |
Narrow the search to only allow stations having a specific status Can only be used for the station collection Available status values can be found here You can read more about how to deal with the status and the datetime parameter in the context of stations here. Examples: Returns stations having the status "Active" on the second of November 2020 or after. This could also be considered "the list of all active stations" if the datetime parameter is set to the current date.
Returns stations having the status "Active" at some time. This means that this also returns stations that have been active at some earlier time but no longer are. Also see "validFrom" and "validTo" fields. |
Examples: Returns observations within the dates UTC 2018-02-12 at midnight and UTC 2018-03-18 at midnight (both dates are inclusive), and within the bounding box having the Southwesterly point of 7.0, 54.0 and northeasterly point of 16.0, 58.0 (which basically covers the area of Denmark), returning a maximum of 100 objects skipping the first 1000.
Returns observations within the dates UTC 2018-02-12 at midnight and UTC 2018-03-18 at midnight (both dates are inclusive), returning a maximum of 20000 objects in total sorted by the "observed" time in descending order |
The API is an OGC API - Features API and follows this standard as documented here: http://docs.opengeospatial.org/is/17-069r3/17-069r3.html.
Data is returned in a FeatureCollection object that describes the returned data-set. Data points are found in the features field which contains a number of Feature objects as described below.
Features are wrapped in a GeoJSON FeatureCollection object, which includes:
Key | Not null | Data Type | Description |
---|---|---|---|
type | yes | String | Always equal to "FeatureCollection" |
features | yes | list<Feature> | See below for the description of the specific Feature object |
timeStamp | yes | String | Timestamp when the response was generated. In RFC3339 5.6 format. |
numberReturned | yes | Number | Number of Feature objects returned |
links | yes | List of Link objects |
Links to pages;
|
Key | Not null | Type | Description |
---|---|---|---|
id | yes | String | Internal database ID |
type | yes | String | Always equal to "Feature" |
geometry.coordinates.0 | yes | float | longitude in WGS84 |
geometry.coordinates.1 | yes | float | latitude in WGS84 |
This is a GeoJSON Feature and the table below describes the returned data:
Key | Not null | Type | Description |
---|---|---|---|
properties.amp | yes | float | Strength of the lightning stroke measured in kiloamperes. |
properties.created | yes | String | Timestamp of creation time in observation database in RFC3339 5.6 format |
properties.observed | yes | String | Observation time in RFC3339 5.6 format |
properties.sensors | yes | String |
A list of the lightning stations which have registered the lightning stroke. They are listed with their sensor number (e.g. "1,2,3,6") separated by a comma. A list of sensors/stations can be seen here Please note that the list of sensors only includes sensors owned by DMI and not the additional 3rd party sensors used for triangulation purposes. |
properties.strokes | yes | integer | Number of strokes registered |
properties.type | yes | integer | Type of lightning detected. The types of lightning can be seen here |
geometry | yes | Object | Triangulated position of the lightning strike in GeoJSON format |
The table below describes how you should interpret the properties returned when requesting data from the sensordata schema:
Key | Not null | Type | Description |
---|---|---|---|
properties.amp | yes | float | Strength of the lightning stroke measured in kiloamperes. |
properties.created | yes | String | Timestamp of creation time in observation database in RFC3339 5.6 format |
properties.direction | yes | String | The direction in which the station has detected the lightning stroke given by its true-north based azimuth. This is a number but formatted as a string. |
properties.observed | yes | String | Observation time in RFC3339 5.6 format |
properties.sensorId | yes | String | The lightning stations which has registered the lightning stroke. A list of sensors/stations can be seen here |
properties.strokes | yes | integer | Number of strokes registered |
geometry | yes | Object | Position of the observation in GeoJSON format. Derived from the stations location |
The table below describes how you should interpret the properties returned when requesting data from the station schema.
Key | Not null | Type | Description |
---|---|---|---|
properties.country | yes | String | Country code |
properties.lastHeartbeat | yes | String | A timestamp, which is renewed at least every 1 to 2 minutes to indicate that the station is in service (in RFC3339 5.6 format, e.g. "2020-09-24T05:58:51Z") |
properties.name | yes | String | The name of the station |
properties.owner | yes | String | Owner of the station |
properties.sensorId | yes | String | The sensor number of the station. A list of sensors/stations can be seen here |
properties.stationId | yes | String | Station id |
properties.status | yes | String | Possible values are "Active" or "Inactive" |
properties.created | yes | String | Creation time in database (in RFC3339 5.6 format, e.g. "2020-07-10T07:59:38Z") |
properties.operationFrom | yes | String | First date the station is operational (in RFC3339 5.6 format, e.g. "2020-07-10T07:59:38Z") |
properties.operationTo | yes | String | Last date the station is operational (in RFC3339 5.6 format, e.g. "2020-07-10T07:59:38Z") |
properties.updated | no | String | Date of the station update (in RFC3339 5.6 format, e.g. "2020-07-10T07:59:38Z") |
properties.validFrom | yes | String | First date the station sends valid data (in RFC3339 5.6 format, e.g. "2020-07-10T07:59:38Z") |
properties.validTo | no | String | Last date the station sends valid data (in RFC3339 5.6 format, example "2020-07-10T07:59:38Z") |
properties.type | yes | String | Station type, See here for available types |
geometry | yes | Object | Position of the station in GeoJSON format |