0

I'm building a web app based on OSM places, excluding administrative zones (such as countries, states, and counties). I've taken an extract of place type = city or town or village or hamlet. But I've noticed a lot of places I need are not there. However when I search them on OSM's website, they exist. Example 1: Westport, Massachusetts. This is a town and has a boundary in OSM but it would not exist when extracting place=town from OSM. Example 2: Nantucket. This is a little more abstract... it is an island but is still something people think of as a place so they would search for it.

I've noticed web sites like FourSquare that use OSM have solved this problem. When you search on FS, the first field is what you are searching (eg Joe's Pizze) the second is place (this is the OSM places). For place they figured out how to translate OSM places into places someone would search for. For example I find all the cities/towns I already have but also Nantucket and Westport, MA. How do sites like FS do it? Is there an logical approach?

Just like FS, I would want an autocomplete field that a user would search these places through.

FourSquare Image

1

Nantucket is tagged as place=town so it should be contained in your database. I couldn't find a place node for Westport, Massachusetts in OSM, this could be an error (however the relation for Westport exists). But there is for example Westport factory.

How did you create your extract? Maybe the extract has been created the wrong way or something went wrong during importing it into your database.

Also note that searching in OSM's database should be done using a geocoder such as Nominatim.

|improve this answer|||||
  • When you search Nantucket on OSM it lists a 'city boundary' then clicking on it reveals admin_level=8: openstreetmap.org/relation/2387088. In contrast, when you search Boston, it returns City (which also has a boundary defined for it). When you do an extract that includes key:place=city (as defined in wiki.openstreetmap.org/wiki/Key:place) then Nantucket does not show up. I guess I could redo the extract to include boundaries but then it starts to get very messy on which boundaries are city vs county and also removing duplicate of city and city boundary for same place – KHMan Jul 20 '16 at 19:25
  • See the first link in my question. Nantucket is tagged as place=town and exists as a node in OSM. – scai Jul 20 '16 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.