I downloaded the geonames file for my city. Then I used osmfilter to keep my nodes of interest (those with name tags in this case). I am trying to construct some sort of dictionary which maps location tags to long/lat pairs. However in my .osm file which I get from osmfilter, only node elements are associated with long/lat data. However, when I use the Nomiantim website to reverse geocode, and I enter the name of a street that actually is specified as a way element in osm, Nominatim gives me the coordinates of the center point of the street (how does Nominatim do this, what extra data does it use?). My question is whether I can calculate/access center point coordinates for "ways" through the data I have in my osm file.
I should add that I don't want to work with Nominatim. The idea is to rely on the .osm file for the construction of this dictionary/map.