Skip to content

cheeaun/sgraildata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SG Rail Data

Singapore Rail data

This is a data-only repository to complement RailRouter SG.

The data

It's in the /data folder.

Changelog in CHANGELOG.md.

Notes

  • ids are not guaranteed to be unique
  • Rail line coordinates are not guaranteed to match the real tracks. They are also simplified and smoothed.
  • Station buildings data is not complete;
    • Incomplete underground building data
    • Missing aboveground building data
    • Missing multiple levels (Ground level, basement level, etc)
  • Some exits data are inaccurate and incomplete

Data sources

Convert SHP to GeoJSON or JSON Records

  1. Upload SHP, DBF and PRJ files on https://mapshaper.org/
  2. Open "Console" and enter -proj from=EPSG:3414 crs=EPSG:4326 to convert from SVY21 (EPSG:3414) to WGS84 (EPSG:4326)
  3. Export as GeoJSON or JSON Records.

Generate final data

  • Run node scripts/build-geojson

Upload tileset to Mapbox Tiling Service (MTS)

Use tilesets-cli.

  • Upload new tileset source: tilesets upload-source <username> <source_id> data/v1/sg-rail.geojson
  • Create new tileset with recipe: tilesets create <tileset_id> --recipe data/v1/sg-rail.recipe.json --name "SG Rail"
  • Update recipe: tilesets update <tileset_id> --recipe data/v1/sg-rail.recipe.json (Note: after update, publish to see changes)
  • Publish tileset: tilesets publish <tileset_id>