0

I want to create a "search-for-anything" using the OSM data. I know the name column is the most relevant attribute, but it come empty sometimes.

What tags I must include in my query to return the maximum data possible of a search?

Example: When the user search for Peter I need to return roads, places, hospitals, etc... with this parameter in the name.

I'm using Java to query the planet_osm_* tables in a PostGIS database. I'm planning to create an Ajax autocomplete method in the HTML users interface to query the database for any word the user types.

2
  • How are you searching the name column now? What program/language/method are you using?
    – kttii
    Commented Jul 11, 2016 at 18:02
  • Oops. Sorry. Editing...
    – Magno C
    Commented Jul 11, 2016 at 23:48

1 Answer 1

2

Some things just don't have a name. For example some minor parks, many forests, parking areas, fountains, post boxes, elevators, waste baskets and so on. Do you want to search for all these things? Then the only option for you is to look at all the corresponding tags. See Map Features for the most important ones. The keys operator and brand are also very important depending on your use-cases.

2
  • I'll be happy searching just what is possible. I just need to know if I can use only the name column or we have some important other. Of corse we have the tag values, but will be impossible to search everyone. The common ones will be enough.
    – Magno C
    Commented Jul 12, 2016 at 10:53
  • As already explained in my answer not every object has a name. If you want to search for objects that don't have a name then you will need to look at other tags, too. See taginfo for the most popular keys. Currently name is only on rank 6.
    – scai
    Commented Jul 12, 2016 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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