Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import implementation from OSMesa project #60

Merged
merged 41 commits into from
Mar 22, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b927f93
Clean out project; Remove obsolete code and related documentation
jpolchlo Mar 1, 2019
72470ae
Update README
jpolchlo Mar 1, 2019
f4d6075
Freshen SBT project configs
jpolchlo Mar 1, 2019
a0ccffc
Remove chatty scalac warnings
jpolchlo Mar 1, 2019
acac58c
Import code from external project
jpolchlo Mar 1, 2019
fa2d035
Include SPI registry
jpolchlo Mar 1, 2019
98ce096
Remove extraneous version identifier
jpolchlo Mar 1, 2019
b7092c1
Remove outdated console setup
jpolchlo Mar 1, 2019
82ee939
Import test suite
jpolchlo Mar 1, 2019
f12c970
Bump version number
jpolchlo Mar 4, 2019
115ccb8
Bring in missing SAX parser from OSMesa (oops)
jpolchlo Mar 5, 2019
4f17b6b
Small config fixes
jpolchlo Mar 5, 2019
d47c826
Move files to right place in tree
jpolchlo Mar 5, 2019
da8643c
Make constructGeometries work for inputs from Change streams as well …
jpolchlo Mar 5, 2019
9b78222
Update README
jpolchlo Mar 5, 2019
b01b60f
Remove raster package
jpolchlo Mar 6, 2019
378b5be
Move Geocode out of ProcessOSM
jpolchlo Mar 13, 2019
c4f14f4
Address PR comments (remove caching facilities, improve conversion fu…
jpolchlo Mar 14, 2019
4bcf487
Fix test
jpolchlo Mar 14, 2019
b1569e8
Make tests pass
jpolchlo Mar 14, 2019
ca6a156
Adjust version number [skipci]
jpolchlo Mar 14, 2019
cfd541a
Unused
mojodna Mar 14, 2019
9558453
Ignore benchmark artifacts
mojodna Mar 14, 2019
0ad9c7a
Remove benchmarks referencing unused code
mojodna Mar 14, 2019
ec0e127
Remove unused imports
mojodna Mar 14, 2019
57ce394
geotrellis.spark.io.hadoop._ _is_ required
mojodna Mar 14, 2019
d161297
Upgrade dependencies
mojodna Mar 14, 2019
a51bdae
Style tweaks
mojodna Mar 14, 2019
b118b33
Additional docs for ProcessOSM entrypoints
mojodna Mar 14, 2019
1260e13
Make sure we are using compressed internal representations for member…
jpolchlo Mar 15, 2019
c2e1571
Reorganize library components; simplify and rename main user-facing i…
jpolchlo Mar 18, 2019
b2a0bbd
Update README to use new struture
jpolchlo Mar 18, 2019
23c6b83
Improve description of `toGeometry`'s output [skip ci]
jpolchlo Mar 18, 2019
e68d7e8
Fix slight README issue
jpolchlo Mar 18, 2019
1b7c43f
Fix tests for new structure
jpolchlo Mar 18, 2019
78820aa
Update docs to include section on internal package and compressed mem…
jpolchlo Mar 19, 2019
51f0827
Make tests work
jpolchlo Mar 19, 2019
bf2b5fc
Clean up
jpolchlo Mar 19, 2019
bb64732
Upgrade to `org.locationtech` organization for JTS (bumps GT and Geom…
jpolchlo Mar 19, 2019
230627d
Adjust copy method definitions for CoordinateSequence subclasses
jpolchlo Mar 22, 2019
12e2da2
Fix tests
jpolchlo Mar 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update README
  • Loading branch information
jpolchlo committed Mar 22, 2019
commit 72470aece63f00c76ac5b255b8ad964ee8da9d45
79 changes: 22 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,60 +5,25 @@ VectorPipe
[![Bintray](https://img.shields.io/bintray/v/azavea/maven/vectorpipe.svg)](https://bintray.com/azavea/maven/vectorpipe)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/447170921bc94b3fb494bb2b965c2235)](https://www.codacy.com/app/fosskers/vectorpipe?utm_source=github.com&utm_medium=referral&utm_content=geotrellis/vectorpipe&utm_campaign=Badge_Grade)

A pipeline for mass conversion of Vector data (OpenStreetMap, etc.) into
Mapbox VectorTiles. Powered by [GeoTrellis](http://geotrellis.io) and
[Apache Spark](http://spark.apache.org/).

Overview
--------

![](docs/pipeline.png)

There are four main stages here which represent the four main shapes of
data in the pipeline:

1. Unprocessed Vector (geometric) Data
2. Clipped GeoTrellis `Feature`s organized into a Grid on the earth
3. VectorTiles organized into a Grid on the earth
4. Fully processed VectorTiles, output to some target

Of these, Stage 4 is left to the user to leverage GeoTrellis directly in
their own application. Luckily the `RDD[(SpatialKey, VectorTile)] => Unit`
operation only requires about 5 lines of code. Stages 1 to 3 then are the
primary concern of Vectorpipe.

### Processing Raw Data

For each data source that has first-class support, we expose a
`vectorpipe.*` module with a matching name. Example: `vectorpipe.osm`. These
modules expose all the types and functions necessary for transforming the
raw data into the "Middle Ground" types.

No first-class support for your favourite data source? Want to write it
yourself, and maybe even keep it private? That's okay, just provide the
function `YourData => RDD[Feature[G, D]]` and VectorPipe can handle the
rest.

### Clipping Features into a Grid

GeoTrellis has a consistent `RDD[(K, V)]` pattern for handling grids of
tiled data, where `K` is the grid index and `V` is the actual value type.
Before `RDD[(SpatialKey, VectorTile)]` can be achieved, we need to convert
our gridless `RDD[Feature[G, D]]` into such a grid, such that each Feature's
`Geometry` is reasonably clipped to the size of an individual tile. Depending
on which clipping function you choose (from the `vectorpipe.Clip` object, or
even your own custom one) the shape of the clipped Geometry will vary. See
our Scaladocs for more detail on the available options.

### Collating Feature Groups into a VectorTile

Once clipped and gridded by `VectorPipe.toGrid`, we have a `RDD[(SpatialKey,
Iterable[Feature[G, D]])]` that represents all the Geometry fragments
present at each tiled location on the earth. This is the perfect shape to
turn into a `VectorTile`. To do so, we need to choose a *Collator* function,
which determines what VectorTile Layer each `Feature` should be placed into,
and how (if at all) its corresponding metadata (the `D`) should be
processed.

Want to write your own Collator? The `Collate.generically` function will be
of interest to you.
VectorPipe (VP) is a library for working with OpenStreetMap (OSM) vector
data. Powered by [Geotrellis](http://geotrellis.io) and [Apache
Spark](http://spark.apache.org/).

OSM provides a wealth of data which has broad coverage and a deep history.
This comes at the price of very large size which can make accessing the power
of OSM difficult. VectorPipe can help by making OSM processing in Apache
Spark possible, leveraging large computing clusters to churn through the large
volume of, say, an OSM full history file.

For those cases where an application needs to process incoming changes, VP
also provides streaming Spark `DataSource`s for changesets, OsmChange files,
and Augmented diffs generated by Overpass.

For ease of use, the output of VP imports is a Spark DataFrame containing
columns of JTS `Geometry` objects, enabled by the user-defined types provided
by [GeoMesa](https://github.com/locationtech/geomesa). That package also
provides functions for manipulating those geometries via Spark SQL directives.

The final important contribution is a set of functions for exporting
geometries to vector tiles. This leans on the `geotrellis-vectortile`
package.
25 changes: 16 additions & 9 deletions project/Version.scala
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
object Version {
val vectorpipe = "0.3.1"
val geotrellis = "2.0.0-RC1"
val geomesa = "2.0.1"
val spark = "2.2.0"
val decline = "0.4.0-RC1"
val monocle = "1.5.0-cats-M2"
val cats = "1.0.0-RC1"
val spire = "0.13.0"
val scalaTest = "3.0.3"
val scala = "2.11.11"
val osmesa = "0.1.0"
val geotrellis = "2.1.0"
val geomesa = "2.1.0"
val vectorpipe = "0.4.0"
val decline = "0.5.0"
val cats = "1.0.0"
val scalactic = "3.0.3"
val scalatest = "3.0.3"
val spark = "2.3.1"
val kryo = "4.0.0"
val snakeyaml = "1.8"
val circe = "0.9.0-M2"
val scalaLogging = "3.5.0"
val commonsIO = "2.5"
val osmosis = "0.46"
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.0.4
sbt.version=1.2.8