Skip to content

Extracts public transportation stops from the National Stop Register at ENTUR

License

Notifications You must be signed in to change notification settings

NKAmapper/nsr2osm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nsr2osm

Extracts public transportation stops from the Norwegian National Stop Register (NSR) NeTEx feed at Entur.

Run nsr2osm_dump.py every morning

  • Github action is run every morning to produce nsr_current.osm and upload as artifact to Github + upload to Google Drive folder.

Usage

nsr2osm

python nsr2osm.py [-upload|-manual]

  • This program is used for updating (coordinates, name and ID of) bus stops and bus stations (only) after the initial import.
    • Creates a nsr_update.osm file with updated stop places which may be uploaded to OSM.
    • Creates a nsr_update_log.txt file with log of modifications done to OSM file.
    • Only bus stops and stations last edited by nsr2osm in OSM are updated.
    • If edited by someone else in OSM, the NSR stop place is included as a reference (if location differs by 1 meter or more, or if the NSR tags name, ref etc. have been modified).
    • Bus stops which have not been used by any route for one year are removed.
  • Options:
    • The -upload option uploads directly to OSM from the nsr2osm import account.
    • The -manual option just creates the two local files for manual insepction in JOSM.
  • Examples of useful searches in JOSM:
    • new -NSR_REFERENCE - New stops to be uploaded.
    • modified -new -NSR_REFERENCE - Modified stops to be uploaded.
    • DELETE - Stops to be deleted (manual deletion in JOSM).
    • EDIT > 2019-03-30 - Stops edited by a user other than the importing user nsr2osm after given date. Contains tags with distance moved from NSR position (if any) and name in NSR (if different than name given by user).
    • TOUCH > 2019-03-30 - Stops edited by a user other than the importing user nsr2osm after given date. The user did not edit coordiante nor name. Only in manual mode. The stops will be touched by nsr2osm during next upload.
    • OTHER > 2010 - Stops not in NSR with last edit after given date.
    • NSR_REFERENCE - Stops in NSR which have been edited by a user other than the importing user nsr2osm. Note that a search for "EDIT" is usually better.
  • Manual uploading:
    • Before uploading you may want to use the Download parent ways and relations function in JOSM to avoid conflicts.
    • Use Upload selection or Purge functions in JOSM to avoid uploading all elements to JOSM.
    • Please remember to remove the extra information tags in capital letters before uploading to OSM.

nsr2osm_dump

python nsr2osm_dump.py [county]

  • This program is used for generating a complete OSM file from the NSR NeTEx files, for the initial import or later inspection.
    • Creates a nsr_current.osm file with all stop places in Norway, or for given county.
    • The ROUTE tag contains information about each route for a given stop, including operator and inbound/outbound information.
  • Mandatory input parameter:
    • Use name of county to produce OSM file for that county, e.g. "Rogaland".
    • Use "Norge" to produce OSM file for the whole country.

Changelog

nsr2osm.py

  • 2.0: Use ElementTree for changeset + improve bus stop history handling.
  • 1.7: Keep bus stops for one year after last used by route.
  • 1.6: Delete bus stops not used by any route.
  • 1.5: Code converted to Python 3.

nsr2osm_dump.py

  • 1.0: Code converted to Python 3. Also fix bug in source data regarding short/long route names.

Notes

About

Extracts public transportation stops from the National Stop Register at ENTUR

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages