Helios Developers

Examples

List the observations near a location
Helios APIs: Observations (Search)

To return a list of observations near a given location (e.g. a forecast area, an area under a weather alert, or a user's smartphone location), we can query the Search method in the Observations API using a variety of query parameter options, depending on our particular needs.

To search for observations located near Los Angeles, CA using a bounding box our API request looks like this:

https://api.helios.earth/v1/observations?bbox=-118.664,33.693,-117.799,34.205

We can also search for observations in the same area using a latitude, longitude, and radius:

https://api.helios.earth/v1/observations?lat=33.9465&lon=-118.1744&radius=30000

If we need more precision on the area of interest where we want to search, we can query using a polygon:

https://api.helios.earth/v1/observations?polygon=-118.664 34.205,-117.799 34.205,-117.799 33.693,-118.664 33.693,-118.664 34.205

When requesting route information from services like Google Maps or Mapbox Directions, the route is often provided as an encoded polyline. We can used this polyline to perform a polygon search around the given route. To search for observations along of a stretch of Interstate 405 in Los Angeles, CA our query looks like this:

https://api.helios.earth/v1/observations?polyline=gyunEpxzqUd_I{wFjtA}pChjL?nfE_mEvi@oyCp[esDl_EsuEcFaiG
Note: polylines are encoded with different precision depending on the provider. For example, Google Maps uses a precision of 5, while services like Mapbox Directions based on the Open Source Routing Machine use a precision of 6. We have used the default value of 5 here. See the API documentation for more information on specifying different values for the polyline precision and radius used to compute the search polygon.

By default, the most recent observation results are returned. See the API documentation for a list of additional query parameters that can be included to filter or sort the results further.