This repository is part of the Pelias project. Pelias is an open-source, open-data geocoder built by Mapzen that also powers Mapzen Search. Our official user documentation is here.
Module that sorts for ambiguous Pelias search and geocoding results
$ npm install pelias-sorting
The pelias-sorting
npm module can be found here:
https://npmjs.org/package/pelias-sorting
The list presented here is used to resolve ambiguities in Pelias. For example, there's only one place named Truth or Consequences so there are no ambiguities to sort. Similarly, Saint Petersburg, Russia is fully-qualified and unambiguous. However, "Lancaster" can be interpreted as any of:
Without additional information such as state to narrow down this list, Pelias sorts these ambiguities according to what the user is more likely referring to. According to the ordering rules below, the input "Lancaster" without focus.point
parameters would return Lancaster, California since it's the most populous of the mid-sized cities. However, if focus.point.lat=54.232&focus.point.lon=-6.721
(roughly the center of Great Britain) was supplied for the same query, then Lancaster, England would be returned first.
Unless otherwise specified, ties between two results at the same layer are broken using population values with higher population results returned first.
Luxembourg
without additional qualification are normally looking for the country.focus.point
or greater population if not supplied.focus.point
or greater popularity if not supplied.focus.point
or greater population if not supplied.focus.point
or greater popularity if not supplied.focus.point
or greater population if not supplied.focus.point
or greater popularity if not supplied.Regarding neighbourhoods, Pelias has no qualitative stance on what the term "popularity" means.