Git Product home page Git Product logo

atlas-generator's Introduction

AtlasGenerator

Build Status quality gate Maven Central CircleCI

AtlasGenerator is a Spark Job that generates Atlas shards from OSM pbf shards (built from an OSM database with osmosis).

Getting started

This project has been implemented and tested with OpenJDK 11

Build

The following command will compile, run checks, and build the library:

./gradlew clean build

Setup example: BLZ (Belize)

The BLZ example can be run with this one-liner:

./gradlew clean run

What this does

  • Downloads the country boundaries and the sharding tree files from the respective sub-folders available here.
  • Downloads a belize snapshot osm.pbf file from Geofabrik
  • It tricks the program into thinking that the 3 shards Belize intersects with in this sharding tree each have a corresponding .osm.pbf file, which will each just be the same copy of the file that was downloaded from geofabrik:
./build/example/data/pbfSource/belize.osm.pbf -> ./build/example/data/pbfs/7-32-57.pbf
./build/example/data/pbfSource/belize.osm.pbf -> ./build/example/data/pbfs/8-64-116.pbf
./build/example/data/pbfSource/belize.osm.pbf -> ./build/example/data/pbfs/8-65-116.pbf
  • Runs the AtlasGenerator Spark job.

The result

  • Three atlas shards in ./build/example/output/atlas/BLZ/
$ ls -alF ./build/example/output/atlas/BLZ/
-rw-r--r--  7097365 BLZ_7-32-57.atlas
-rw-r--r--  658860 BLZ_8-64-116.atlas
-rw-r--r--  590425 BLZ_8-65-116.atlas

Those 3 files can be loaded together at once, in the JOSM Atlas plugin for example, or programmatically loaded with a MultiAtlas using the AtlasResourceLoader from the atlas project.

How it looks like

This is one shard visualized using the josm-atlas plugin:

josm-atlas1 josm-atlas2

Contributing

Please see the contributing guidelines!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.