Skip to content

Convert Lantmäteriet topography data into files for OpenStreetMap

License

Notifications You must be signed in to change notification settings

NKAmapper/topo2osm-sweden

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

topo2osm-sweden

Convert Lantmäteriet topography data into files for OpenStreetMap.

Usage

Usage: python3 topo2osm.py <municipality> [<category>] [-options]

Paramters:

  • municipality - Name of municipality or 4 digit municipality number.
  • category - Optional, one of the following data categories (themes) in the topography datasets:
    • Anläggningsområde - Landuses for industry, leisure and public usage. Useful for airports and sport pitches/tracks.
    • Byggnadsverk - Special buildings/structures such as communication masts, towers, chimneys etc. Use building2osm to get buildings with better data.
    • Hydro / Hydrografi - Waterways. Used in the Topo (default) category.
    • Höjd - Mountains/peaks.
    • Kommunikation - Hiking related features such as routes and snowmobile trails. Use nvdb2osm to get highways with better data.
    • Kulturhistorisk lämning - Heritage and archeological sites. Only provided with raw geojson output. Not provided for Topography 10.
    • Ledningar - Power lines and transformer station areas.
    • Mark - Land cover features such as wood, wetland, farmland and industrial/residential areas.
    • Naturvård - National parks, nature reserves and other protected areas. Use reserve2osm to get protected areas with better data (to be extended for Sweden).
    • If no category is provided, a combination of Mark and Hydrogrfi will be produced, including place names (also called category Topo).
  • options:
    • -seanames - Include place names in the sea, such as bays, straits etc.
    • -baynames - Include place names which are parts of lakes and rivers, such as bays, straits, still water etc.
    • -wetland - Try to merge boundaries of wetland with wood and other topological features.
    • -nosimplify - Do not simplify or concatenate geometry lines before output.
    • -geojson - Output raw topo source data in geojson file.

Requirements

Notes

  • The topo data is loaded from Lantmäteriet's Geotorget service. The data is free, but you need to apply for each dataset. Remember to say that you intend to use it for OpenStreetMap.
  • The dataset Topografi 10 is supported, as well as Topografi 50, 100 and 250.
  • OSM relations are automatically created based on polygons and segment lines in the dataset. Note that wetland is in general not connected to other features. This will result in overlapping ways and nodes from wetland.
  • Place names are derived from the dataset Ortnamn at Lantmäteriet, combined with coordinates used by each Topografi datasets. A few category corrections are made.
  • River centerlines for waterway=river in water=river polygons are missing, but will hopefully be available if permission to use the Hydrografi dataset is obtained from Lantmätriet.
  • Parts of he program has exponential complexity. Most municipalities will run in a few seconds, large municipalities will run in minutes, while the largest municipalities might require more than an hour to complete.
  • A few FIXME=* tags are produced for place names whenever there are more than one name for an feature. Overlapping names are sorted by appearence in the various topo maps by Lantmäteriet (Topografi 250 with highest rank, then 100 etc).
  • Enclaves in municipalities are disregarded, i.e. everything within the outer boundary of the municipality is included. Exclaves are included for completeness.
  • See example files at Topo Sverige on Jottacloud.

Changelog

  • v0.4: Loads municipality boundary from Lantmäteriet api; Enclaves are disregarded; Minor fixes and improvements.
  • v0.3: Initial Beta version. A few minor improvements to be done.

References

About

Convert Lantmäteriet topography data into files for OpenStreetMap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages