I am new to GIS and need to achieve the following:
Find the nearest train station or bus stop of given GPS coordinates in a Java application. Since there are many coordinates to be checked, an offline calculation is preferred. Visual rendering of maps is NOT required.
After some research, I thought of the following:
- use OpenStreetMap, download the maps
- extract the relevant nodes using osmosis ("... --tf accept-nodes ...")
- import the data into a PostgreSQL/PostGIS database
- finally run the queries to select nearby train station
Can you tell me if the outlined approach is possible and useful? Are there other, better ways to solve the problem?
How can I implement step 4 in a simple yet effective way? Are there Java libraries which assist with the PostGIS stuff?