facilityregistry / fred-api

Facility Registry API Documentation Website
11 stars 4 forks source link

Please review: How to sort by location (distance to a point)? #61

Open edjez opened 11 years ago

edjez commented 11 years ago

We currently have a single-field sort capability:

/facilities.json?sortAsc={property1}

Need to have a parametrized sort for sorting facilities as a function of a distance to a point. The point is the argument, in lat long format.

Suggest this syntax: /facilities.json?sortAsc={fromCoordinates:-1.6917,29.525}

where the two numbers after fromCoordinates are lat & long in WGS84 decimal format. Notation input welcome!

Note: this could help implementation of an IHE profile, so speedy feedback appreciated.

Interested Parties: IHE