https://github.com/rubenv/osmtopo
OpenStreetMap topology extraction tools
https://github.com/rubenv/osmtopo
Last synced: about 2 months ago
JSON representation
OpenStreetMap topology extraction tools
- Host: GitHub
- URL: https://github.com/rubenv/osmtopo
- Owner: rubenv
- Created: 2015-03-24T15:08:15.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-08-30T08:26:46.000Z (almost 8 years ago)
- Last Synced: 2025-02-24T08:27:19.136Z (over 1 year ago)
- Language: Go
- Size: 5.13 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenStreetMap topology extraction tools
Tools to work with OpenStreetMap topology data, ideal if you want to extract
useful shapes for use in maps.
Work in progress!
[](https://travis-ci.org/rubenv/osmtopo)
## Installing
```
go install github.com/rubenv/osmtopo/bin/osmtopo
```
Or use the Docker image, which is available here: https://hub.docker.com/r/rubenv/osmtopo/
```
alias osmtopo="docker run -ti --rm -v $(pwd):/data docker.io/rubenv/osmtopo"
```
Be sure to put your data store in /data when using the alias above
## Quick start
Get a suitable water polygon first:
```
osmtopo -d /path/to/store water download /tmp/water.zip
```
Import it:
```
osmtopo -d /path/to/store water import /tmp/water.zip
```
Find a suitable data set:
* Either one of the PBF files at GeoFabrik: http://download.geofabrik.de/
* Or the entire world: http://planet.openstreetmap.org/pbf/planet-latest.osm.pbf
Note that big data sets take a long time to process, you've been warned!
Import it:
```
osmtopo -d /path/to/store import belgium-latest.osm.pbf netherlands-latest.osm.pbf
```
## Troubleshooting
### panic: file open: open belgium-latest.osm.pbf: too many open files
You're probably using a Mac, which has idiotically low open file limits by default.
Try the following:
```
ulimit -n 1024
```
### It's using too much memory / CPU
Working with big data isn't for the faint of heart. I don't recommend running
this on a Raspberry Pi. Get something with an SSD, a beefy CPU and 16+GB of
RAM.