cboone / osm-lakelines

Calculate nice centered linestrings for labelling OpenStreetMap lakes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenStreetMap Lake Labels

Lake center lines for labels

Calculate nice centered linestrings for labelling lake polygons. This repository provides downloadable geojson 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 from the releases page.

Info

This is a dedockerized version of https://github.com/lukasmartinelli/osm-lakelines . It's meant to be used with a pre set up environment like https://github.com/acalcutt/wdb-map-gen

Needs: openmaptiles-tools ( https://github.com/openmaptiles/openmaptiles-tools) label_centerline ( https://github.com/ungarj/label_centerlines.git ) pgsql2shp ( https://postgis.net/install/ )

Run Workflow

OSM Planet PBF -> imposm3 -> PostgreSQL -> pgsql2shp -> osm_lake_polygon.shp -> label_centerlines -> lake_centerline.geojson -> ogr2ogr --> lake_centerline.shp

About

Calculate nice centered linestrings for labelling OpenStreetMap lakes

License:MIT License


Languages

Language:Shell 100.0%