Skip to content
Snippets Groups Projects

toar-location-services

1. Synopsis

Python Django services to extract station characterisation information from global geographic and geophysical datasets.

All "location" services provide similar REST interfaces so that they can easily be harvested, e.g. for inclusion into the TOAR database:

.../location/SERVICE_NAME/?lat=Y&lon=X&OPTIONS

Valid SERVICE_NAMEs are:

major-roads: returns distance to major roads using the OpenStreetMap Overpass interface

population-density: returns aggregate statistics of population density from the GdW3.1 1 km dataset

Arguments:

Y: latitude in degrees_north (southern latitudes as negative values)

X: longitude in degrees_east (either -180 to +180 or 0 to 360)

Note: You can also write long or longitude instead of lon, or latitude instead of lat.

OPTIONS:

radius=: radius in m for aggregation of results. Default: 20000, i.e. 20 km.

agg=mean|median|min|max|NN-percentile: aggregation method. Not all methods work with all services. For example, major-raods will always return the nearest distance to a road. NN-percentile can also be written as NN%-ile.

direction=N|NEN|NE|ENE|E|ESE|SE|SES|S|SWS|SW|WSW|W|WNW|NW|NWN: restrict search and/or aggregation to specified wind sector.

by-direction=True: return result for each wind sector. The result will be an array (or dict??) instead of a single value.

Individual services may have additional optional URL parameters.