Railway Geolocation is a Node.js package for fetching and processing railway station data worldwide using the Overpass API. This package allows you to retrieve detailed station data, including nearby cities, with minimal setup and no external database required.
- Global Railway Stations: Retrieve railway station data for any country by specifying the ISO3166-1 country code.
- City Geolocation: Get nearby city details for each station.
- Simple Integration: Easily integrate with your Node.js projects.
- No External Database: Fetch data directly from the Overpass API without additional setup.
- Flexible Usage: Supports any country with Overpass API coverage.
Operating System |
---|
Windows |
MacOS |
Linux |
Operating System |
---|
Cloud-based Environments (e.g., CodeSandbox, Repl.it) |
Install the package using npm:
npm install railway-geolocation
const { getStationsWithDetails } = require("railway-geolocation");
(async () => {
// Fetch railway station details for Bangladesh
const bangladeshStations = await getStationsWithDetails("BD");
console.log("Bangladesh Stations:", bangladeshStations);
})();
[
{
"Lat": 23.8103,
"Lon": 90.4125,
"Station": "Dhaka Railway Station",
"City": "Dhaka"
},
{
"Lat": 22.8456,
"Lon": 89.5403,
"Station": "Khulna Railway Station",
"City": "Khulna"
}
]
Contributions are welcome! If you find any issues or have feature requests, please feel free to open an issue or submit a pull request.
This project is licensed under the ISC License.
Developed by Md. Atikur Rahman.