I have downloaded data from geonames and then followed the below link to dump it into POSTGIS.
https://github.com/colemanm/gazetteer/blob/master/docs/geonames_postgis_import.md
I'm not sure how to get places between two routes at the moment. The table has separate columns for latitude and longitude.
I need to get places between the route, is there anyway of doing it?
WHAT I HAVE TRIED
Get places between two points :
SELECT * FROM geoname WHERE
ST_DWithin('POINT(44.8781 -116.6298)',
ST_GeographyFromText('POINT(43.7392 -114.9903)'), 16093.4);
I'm getting 0 results, even though I'm sure there are places near these points.
Also I have tried,
SELECT * FROM geoname WHERE
ST_Distance_Sphere('POINT(44.8781 -116.6298)',
ST_MakePoint(43.7392,-114.9903)) <= 16093.4;
Is it something to be done using pgRouting. May be something like get a route using pgRouting and then get the places along the path.