Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 1.56 KB

location-search.md

File metadata and controls

60 lines (41 loc) · 1.56 KB

Location search

Location search is used to search locations by coordinates using the WGS84 datum.

{% hint style="warning" %} Geopositional search is supported in Aidbox only with Aidboxdb 15.3 and later. {% endhint %}

Supported search parameters

Search parameterSupported?Description
neartruekm and [mi_us] units are supported
containsfalse

Near Search Parameter

Search for locations near the specified geo-coded position.

GET [base]/Location?near=<latitude>|<longitude>|[distance]|[units]

Latitude and longitude are required.

If the units are omitted, then kms are assumed.

If the distance is also omitted, then Aidbox treat "near" as 3 km.

Examples

Get locations within 11.2 kms of the some geo-coded position:

#                   latitude |longitude|distance|units
GET /Location?near=-83.674810|42.266500|11.20|km

Response:

resourceType: Bundle
total: 1
entry:
  - resource:
      position:
        latitude: -83.69481
        longitude: 42.2565
      id: >- loc-1
      resourceType: Location

Search in miles:

GET /Location?near=-83.674810|42.266500|11.20|[mi_us]

Search without distance and units

# distance = 3, units = km
GET /Location?near=-83.674810|42.266500