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.
When collecting data for use in a geocoder, it's obviously important to know which city, country, etc each record belongs to. Collectively we call these fields the admin hierarchy.
Not every data source contains this information, and even those that do don't always have it consistently. So, for Pelias we actually ignore all admin hierarchy information from individual records, and generate it ourselves from the polygon data in Who's on First. This process is called admin lookup.
Admin lookup is essentially reverse geocoding: given the latitude and longitude of a point, populate the admin hierarchy by finding all the polygons for countries, cities, neighborhoods, and other admin fields that contain the point.
There are two possible ways to retrieve admin hierarchy: using remote pip service or load data into memory. It's recommended to use remote service in all cases (see downsides section bellow).
Who's On First Admin Lookup module recognizes the following top-level properties in your pelias.json config file:
{
"imports": {
"adminLookup": {
"enabled": true
},
// NOT RECOMMENDED: getting data from folder
"whosonfirst": {
"datapath": "/path/to/wof-data"
},
"services": {
// getting data from remote pip service
"pip": {
"url": "https://mypipservice.com"
}
}
}
}
There are two: admin lookup slows down the process of loading data into Pelias, and it takes quite a bit of memory. Based on the current amount of data in Who's on First, count on using at least 4 or 5 GB of memory just for admin lookup while importing.