Skip to content

Commit

Permalink
Unit Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
James McClain committed Aug 29, 2016
1 parent ccf4980 commit 190fb46
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -11,6 +11,7 @@ import org.apache.spark._
import org.apache.spark.rdd._
import org.scalatest._


class VectorJoinSpec extends FunSpec with Matchers with TestEnvironment {

it("Joins two RDDs of Geometries") {
Expand All @@ -22,12 +23,9 @@ class VectorJoinSpec extends FunSpec with Matchers with TestEnvironment {

val left: RDD[Polygon] = sc.parallelize(Array(polyA, polyB))
val right: RDD[Line] = sc.parallelize(Array(line))
// TODO: Actually TileLayout is too specific, we don't need to know anything about pixels
// We only need to know how to partition space

val res: Vector[(Polygon, Line)] = VectorJoin(
left, right,
LayoutDefinition(LatLng.worldExtent, TileLayout(10,10, 256, 256)),
{ (left: Geometry, right: Geometry) => left intersects right}
).collect.toVector

Expand Down

0 comments on commit 190fb46

Please sign in to comment.