Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peermaps/peermaps
peer to peer cartography
https://github.com/peermaps/peermaps
Last synced: about 1 month ago
JSON representation
peer to peer cartography
- Host: GitHub
- URL: https://github.com/peermaps/peermaps
- Owner: peermaps
- License: other
- Created: 2014-05-31T22:47:24.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-11-10T01:59:47.000Z (about 3 years ago)
- Last Synced: 2024-04-13T21:48:30.577Z (8 months ago)
- Language: JavaScript
- Homepage: https://peermaps.github.io
- Size: 293 KB
- Stars: 298
- Watchers: 19
- Forks: 17
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - peermaps/peermaps - peer to peer cartography (others)
README
# peermaps
peer to peer cartography
This tool streams raw OpenStreetMap data from p2p networks so that you can
perform ad-hoc extracts for arbitrary bounding boxes. Because you are pulling
the data from a p2p network (and helping to host it), you also don't need to
worry about http quotas or rate limiting.# example
Stream data inside arbitrary WSEN extents from the network:
```
$ peermaps data -155.064270 18.9136925 -154.8093872 19.9 | head
```# install
requirements:
* [ipfs](https://dist.ipfs.io/#go-ipfs)
* [nodejs + npm](https://nodejs.org)
* [osmconvert](https://wiki.openstreetmap.org/wiki/Osmconvert#Download)
* bash (for the `peermaps data` command)Install the prerequisites, then install the `peermaps` command:
```
npm install -g peermaps
```Run the ipfs daemon somewhere (in a `screen` for example):
```
ipfs daemon
```Now you can use the `peermaps` command.
# usage
```
peermaps data W,S,E,N {OPTIONS}Print all data inside the W,S,E,N extents.
-f Output format: osm (default), o5m, pbf, csv.
-n Network: ipfs (default)
--show Print the generated command instead of running it.peermaps files W,S,E,N
Print the files from the archive that overlap with the W,S,E,N extents.
-n Network: ipfs (default)
peermaps read FILE
Print the content of FILE from the archive.
-n Network: ipfs (default)
peermaps address
Print the address of the peermaps archive for the given network.
-n Network: ipfs (default)
peermaps generate INFILE {OPTIONS}
Generate a peermaps archive at OUTDIR for INFILE.
-o OUTDIR Default: ./mapdata
-t MAXSIZE Files must be no greater than MAXSIZE. Default: 1M
--xmin Minimum longitude (west). Default: -180
--xmax Maximum longitude (east). Default: 180
--ymin Minimum latitude (south). Default: -90
--ymin Maximum latitude (north). Default: 90
--xcount Number of longitude divisions per branch. Default: 4
--ycount Number of latitude divisions per branch. Default: 4
--nproc Number of converter processes to spawn. Default: (`nproc`-1)Example:
peermaps generate planet-latest.osm.pbf -o ~/data/planet -t 5MNote: this operation may take days for planet-sized inputs.
```
# mirror
Help us mirror the archive! If you have a computer with ~38G and network to
spare, you can run:```
ipfs pin add QmXJ8KkgKyjRxTrEDvmZWZMNGq1dk3t97AVhF1Xeov3kB4
```For now there is only one archive hash. In the future, there will be more
archives and an update mechanism.# todo
* generate and host vector tiles on p2p networks
* dat/hyperdrive support
* archive update mechanism
* torrent/webtorrent support?
* p2p web tile viewer
* make the generate step much faster by patching osmconvert.c