Skip to content
This repository has been archived by the owner on Jun 3, 2018. It is now read-only.

Calculate nice centered linestrings for labelling OpenStreetMap lakes

License

Notifications You must be signed in to change notification settings

lukasmartinelli/osm-lakelines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenStreetMap Lake Labels

⚠️ This repository is no longer actively maintained by Lukas Martinelli.

Lake center lines for labels

Calculate nice centered linestrings for labelling lake polygons. This repository provides downloadable Shapefiles containing center lines for lake polygons that you can use to label OSM lake polygons. You can match the OSM ID of the linestrings to your data source to merge the data.

It is using ungarj/label_centerlines from Joachim Ungar to calculate the center lines. This doesn't always result the optimal result and has issues with more complicated lake structures but is sufficient enough for most use cases. Linestrings are not calculated for all lake polygons. Very small polygons, multi polygons and lakes without names are excluded.

📂 Download lake center lines as GeoJSON, Shapefile, GeoPackage from the releases page.

Run Workflow

The entire project is structured components using Docker containers to work together. Ensure you meet the prerequisites.

Start up the PostgreSQL database with the PostGIS extension.

docker-compose up -d postgres

Now download a OSM PBF extract and store it in the ./data dir.

wget -P ./data https://s3.amazonaws.com/metro-extracts.mapzen.com/zurich_switzerland.osm.pbf

Import the OSM PBF.

docker-compose run import-osm

Export a Shapefile containing simplified lake polygons.

docker-compose run export-shapefile

Calculate lake center lines from the previously exported Shapefile.

docker-compose run calculate-centerlines

About

Calculate nice centered linestrings for labelling OpenStreetMap lakes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages