Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

This is my first time posting here so please forgive me if i ask a trivial question. Is there a way of obtaining the type of road an object is settled in from a request via nominatim? (i have the geocoded sample)

For example:

does provide me with loads of info. yet, there is no info on the road the address is settled in. would like to obtain something like: rural road or even just grade*N* (where N stands for the level of hierarchy.) i hope what i'm looking for is understandable :) thanks in advance!

share|improve this question
I think road hierarchy is usually a jurisdictional manner in the true transportation sense. You're best bet is to contact your local transportation agency or the agency responsible for the data and get their GIS classification scheme + layer. I'm not sure about the UK, but in North America a lot of this data is available online for free. –  dassouki Aug 28 '12 at 16:03

3 Answers 3

You can't do it in one query, but, you can get Nominatim place_id and use details.php

and parse highway information.

Pilkington Avenue (Type: highway:residential, way 218846952, 15, 0 GOTO)

But, Nominatim's wiki says:

Currently the details page (details.php) creates a high load on the server and is only intended as a debugging aide, as a result no xml api is currently provided. Scraping or heavy use is likely to result in an IP ban.

So you if you planed to use this approach often, you will need to setup your own Nominatim or another geocoder instance.

share|improve this answer

It appears to be undocumented, but you can put lat,lon in the q parameter for search.php and it seems to function as a reverse geocoder and return type information. Try pasting lat,lon into the query box on

share|improve this answer

The hierarchy of roads is reflected in OSM by the "highway" field. Possible values in hierarchical order are: motorway, trunk , primary, secondary, tertiary, unclassified, residential, service, track, path

See this wiki pages:

highway=road is default for unknown classification (e.g. if only digitized by aerial photo).

BUT: It is allowed to change highway type in order to reflect the importance for routing purposes.

share|improve this answer
Thank you @Andre Joost for your helpful remarks. However, the highway field is not supplied within the xml document returned from a request via nominatim. therefore my question was rather related to how to obtain this information from an API or something similar. –  Seb Aug 29 '12 at 14:57
Thats true, but you get the osm_id. With that you can query the full information of the way element:<osm_id>; or<osm_id>; . But keep in mind that the Openstreetmap api is not designed for extensive querying. –  AndreJ Aug 29 '12 at 15:20
Other possibility: get the Geofabrik roads shapefile of your country, and look up the osm_id. Road class is in the "type" column. –  AndreJ Aug 31 '12 at 9:50
It wouldn't work. Because Nominatim have returned id of way for building (osm_id="90394420" is a building) not for Pilkington Avenue. And it's residential, not road. –  dmitry.v.kiselev Mar 11 at 13:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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