I am new to geocoding and am trying to build a geo application. I used osm2pgsql to convert my osm data to pgsql gis extended database with the following tables planet_osm_line, planet_osm_polygon, planet_osm_point, planet_osm_ways, ...etc
My first query is to find the distance between 2 randomly given addresses using the above generated tables.
Can someone explain how to query these tables to attain the result ?
The duplicate Convert OSM File to get addresses using Osm2pgsql which was linked does not have proper information to query tables.
For example, I need to know which column has the name of the streets and which column has the house numbers and which column has names of the city or state and how to query between them to geocode or reverse geocode.