Frost v1 (work in progress)
DISCLAIMER: This version of Frost is still work in progress. MET Norway does not guarantee that the service will always behave 100% according to documentation or expectations.


Geo Search

Geo search allows for filtering and sorting of time series and observations based on geo positions: longitude, latitude, and height above mean sea level.
A basic component for geoserch is a point which is defined: {"lon": ..., "lat": ..., "height": ...} where the height is optional.

Polygon

This field is a simplified version of the field "inside", which is used in the advanced version of the API. This field is used for defining a polygon for which all stations / data inside the polygon will be returned. You define a series of points (lat / lon) that define the polygon. An example of the syntax can be seen below:
    
    [{"lat":59.93,"lon":10.05},{"lat":59.93,"lon":11},{"lat":60.25,"lon":10.77}]
    

Nearest

This field is used for finding the nearest stations / observations to a latitude and longitude. In addition to the point that you want to find observations close to, you must also define how many stations you want to find (maxcount) and how far away they are allowed to be (maxdist). Please note that in areas with sparse station coverage you may get less than the desired number of stations returned within the max distance.
nearest clarification diagram
In the diagram you can see an explantion of nearest, including clarification of maxdist and maxcount. Even if there are more stations in the defined radius around the lat/lon you will not be returned these stations. An example of the syntax can be seen below:
    
    {"maxdist":7.5,"maxcount":3,"points":[{"lon":10.05,"lat":59.93}]}
    
https://frost-beta.met.no/api/v1/obs/met.no/filter/get?incobs=false&nearest={"maxdist":5,"maxcount":5,"points":[{"lon":10.75,"lat":59.91}]}

Inside

inside clarification diagram Search for weather observations inside a geographic area. It is possible to define a: polygon, circle, lonrange, latrange. You can see an example of a polygon in the image, where the data from the stations inside the polygon will be returned but not the data from the stations outside. It is also possible to define a maxheight and minheight, in order to specify that you do not want stations outside that range. The polygon is similar to the above polygon field, just that you must define the type to be polygon in an outer set of brackets.

You can for example define a circle with a lat / lon in the center an a radius. Since its possible to define several areas, hence the object should be wrapped in an array like [{},{}...]. An example of the syntax can be seen below:
    
    [{"type":"circle","lon":10.75,"lat":59.91,"radius":7.5,"minheight":30,"maxheight":50}]
    

https://frost-beta.met.no/api/v1/obs/met.no/filter/get?incobs=false&inside={"type":circle,"lon":10.75,"lat":59.91,"radius":7.5,"minheight":30,"maxheight":50}

Outside

Search for weather observations outside a geographic area. It is possible to define a: polygon, circle, lonrange, latrange. The data from the stations outside the polygon will be returned but not the data from the stations inside. It is also possible to define a maxheight and minheight, in order to specify that you do not want stations outside that range. The polygon is similar to the above polygon field, just that you must define the type to be polygon in an outer set of brackets.


You can define several areas, hence the object should be wrapped in an array like [{},{}...]. You can for example define a polygon and a circle. An example of the syntax can be seen below (this results in a large list, where you need pagination):
    
    [{"type":"polygon","pos":[{"lat":59.93,"lon":10.05},{"lat":59.93,"lon":11},{"lat":60.25,"lon":10.77}]}, {"type":"circle","lon":9,"lat":61.5,"radius":300,"minheight":30,"maxheight":50}]
    

Stationary vs mobile positions

Positions that are subject to geo search are either stationary or mobile. Using terminology of the Frost v1 /obs design, a stationary position is one that is defined in the "extra" object of the time series header (TSH). All observations of such a time series will implicitly have that position. A mobile position, on the other hand, is defined in the "body" object of the time series observation (TSO). This allows the position to vary between observations.
An extra query parameter geopostype is available to force Frost to ignore any geo position in either TSH or TSO. Possible values are stationary and mobile for ignoring geo positions in respectively TSO and TSH, or both (the default) for considering all available geo positions.
    
    geopostype: mobile
    
Nearest is applicable to stationary positions only. The reason for this is that Frost delivers output time series by time series (rather than by obs time). This in turn is a fundamental requirement for the pagination protocol. Note that nearest has no effect if geopostype=mobile!