Your own place names: HQ, depot 3, store 117
People write “deliver to depot 3”, not an address. Two ways to make those names answer: a table of aliases for a handful of names, and a sheet of your own places for hundreds.
New Places and zones Command line Server, Docker Logistics, field work Health
What you have
aliases.csv: a name and the address it stands for. places.csv: a name and a point, with an optional group and code.
name,address HQ,"233 S Wacker Dr, Chicago, IL 60606" Depot 3,"2100 S Halsted St, Chicago, IL 60608" Store 117,"600 N Michigan Ave, Chicago, IL 60611"
name,lat,lon,group,code Depot North,41.9484,-87.6553,depot,D1 Depot South,41.8517,-87.6466,depot,D2 Clinic Loop,41.8810,-87.6290,clinic,C7
Steps
1. A name from the alias table answers with the address behind it, marked alias:
$ gridpin query usa.bin "Store 117" -k 1 --aliases aliases.csv
{"alias_name":"Store 117","commune":"Chicago","confidence":0.949999988079071,"flags":["street_exact","commune_exact","house_rep","pc_exact","alias"],"housenumber":"600","lat":41.8929239,"lon":-87.6248765,"match_level":"PointAddress","match_status":"M","postcode":"60611","precision":"house","score":7.2687788009643555,"street":"North MICHIGAN Avenue","weak":false}
2. Build a sheet of your own places; it takes a second for thousands of rows:
$ gridpin build --places places.csv places.bin 2>&1 | tail -1 3 places -> places.bin
3. Ask with your sheet first and the country file after it:
$ gridpin query usa.bin "clinic loop" -k 1 --also places.bin
{"lat":41.881,"lon":-87.629,"precision":"street","score":3.0,"confidence":0.9,"street":"Clinic Loop","commune":"clinic","postcode":"","flags":["street_exact","own_sheet"],"weak":false,"match_level":"StreetName","match_status":"M"}
What you get
An alias answers with the full address answer plus alias_name. A place of your own answers with its point and the flag own_sheet; its group comes back as the town. gridpin serve usa.bin --also places.bin does the same over HTTP.
Why it works
Both are asked before the country file. An alias is a name for a real address, so the answer is still the house from the file, with its precision. A place sheet holds points that are not addresses at all (a depot gate, a clinic entrance), so it answers where you put the point.
Limits
- An alias matches the name as a whole:
store 117inside a longer sentence is not found; for that, see addresses in free text. - A place sheet answers at street level (
StreetName): it holds points, not house numbers. - Names are not shared between machines: the files go where the geocoder runs.
All its keys: query, build. The functions: your own data, a sheet of your own places.