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
Fix tests
The main change here is the removal of a pathological piece of geometry
from the tests.  Previous iterations of this test may have "gotten
lucky" in passing at any point in the past; the logic in the relation
reconstruction code was not up to the challenge.
  • Loading branch information
jpolchlo committed Mar 22, 2019
commit 12e2da27dc897dbe52235ee314cb652294aefe74
5 changes: 4 additions & 1 deletion src/main/scala/vectorpipe/relations/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,12 @@ package object relations {
}

def formRings(segments: GenTraversable[LineString])(
implicit geometryFactory: GeometryFactory): GenTraversable[Polygon] =
implicit geometryFactory: GeometryFactory): GenTraversable[Polygon] = {
val csf = geometryFactory.getCoordinateSequenceFactory
formRings(segments.map(_.getCoordinateSequence).map(s => new VirtualCoordinateSequence(Seq(s))))
.map(csf.create(_))
.map(geometryFactory.createPolygon)
}

def dissolveRings(rings: Array[Polygon]): (Seq[Polygon], Seq[Polygon]) = {
Option(geometryFactory.createGeometryCollection(rings.asInstanceOf[Array[Geometry]]).union) match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ trait SparkPoweredTables extends Tables {
.setIfMissing("spark.master", "local[*]")
.setIfMissing("spark.serializer", classOf[KryoSerializer].getName)
.setIfMissing("spark.kryo.registrator", classOf[KryoRegistrator].getName)
.setIfMissing("spark.sql.orc.impl", "native")
).getOrCreate()
spark.withJTS

Expand Down Expand Up @@ -88,8 +89,8 @@ class MultiPolygonRelationExamples extends SparkPoweredTables {
relation(61315), // incomplete member list (sourced from an extract of a neighboring state)
relation(2554903), // boundary w/ admin_centre + label node members
relation(191204), // no members
relation(110564), // touching but not dissolve-able
relation(5612959) // pathological case for unioning
/* relation(5612959), // pathological case for unioning --- removed test, too pathological (address later?) */
relation(110564) // touching but not dissolve-able
)
}

Expand Down