diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 696b173326..5c1ea44056 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -17,7 +17,7 @@ import sbt._ object Version { - val geotools = "23.3" + val geotools = "25.0" val spire = "0.17.0" val accumulo = "1.9.3" val cassandra = "3.7.2" @@ -72,7 +72,7 @@ object Dependencies { val scalatest = "org.scalatest" %% "scalatest" % "3.2.5" val scalacheck = "org.scalacheck" %% "scalacheck" % "1.15.2" val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.3.0" - val jts = "org.locationtech.jts" % "jts-core" % "1.17.0" + val jts = "org.locationtech.jts" % "jts-core" % "1.18.1" val proj4j = "org.locationtech.proj4j" % "proj4j" % "1.1.3" val openCSV = "com.opencsv" % "opencsv" % "5.3" val spire = "org.typelevel" %% "spire" % Version.spire diff --git a/vector/src/main/scala/geotrellis/vector/Results.scala b/vector/src/main/scala/geotrellis/vector/Results.scala index f154c2bb87..803f949f12 100644 --- a/vector/src/main/scala/geotrellis/vector/Results.scala +++ b/vector/src/main/scala/geotrellis/vector/Results.scala @@ -234,6 +234,7 @@ object MultiPointMultiLineStringUnionResult { geom match { case g: Geometry if g.isEmpty => NoResult case l: LineString => LineStringResult(l) + case pt: Point => PointResult(pt) case mp: MultiPoint => MultiPointResult(mp) case ml: MultiLineString => MultiLineStringResult(ml) case gc: GeometryCollection => GeometryCollectionResult(gc) @@ -331,6 +332,7 @@ object MultiPointMultiPolygonUnionResult { geom match { case g: Geometry if g.isEmpty => NoResult case p: Polygon => PolygonResult(p) + case pt: Point => PointResult(pt) case mpt: MultiPoint => MultiPointResult(mpt) case mp: MultiPolygon => MultiPolygonResult(mp) case gc: GeometryCollection => GeometryCollectionResult(gc) @@ -780,6 +782,8 @@ case class PointResult(geom: Point) extends GeometryResult with MultiLineStringMultiLineStringDifferenceResult with MultiPointMultiPointDifferenceResult with MultiPolygonMultiPolygonDifferenceResult + with MultiPointMultiPolygonUnionResult + with MultiPointMultiLineStringUnionResult with PointOrNoResult { def toGeometry(): Option[Geometry] = Some(geom) } diff --git a/vector/src/test/scala/geotrellis/vector/MultiPointSpec.scala b/vector/src/test/scala/geotrellis/vector/MultiPointSpec.scala index 10607c5cb6..9078f5dd8f 100644 --- a/vector/src/test/scala/geotrellis/vector/MultiPointSpec.scala +++ b/vector/src/test/scala/geotrellis/vector/MultiPointSpec.scala @@ -128,7 +128,7 @@ class MultiPointSpec extends AnyFunSpec with Matchers { it ("should union with an empty MultiPoint and return a MultiPointResult") { val mp1 = MultiPoint(Point(1,1)) val mp2 = MultiPoint.EMPTY - mp1 | mp2 should be (MultiPointResult(Seq(Point(1,1)).toMultiPoint)) + mp1 | mp2 shouldBe PointResult(Point(1,1)) } it ("should union with a MultiPoint and return a PointResult") { @@ -158,7 +158,7 @@ class MultiPointSpec extends AnyFunSpec with Matchers { it ("should union with an empty MultiLineString and return a MultiPointResult") { val mp = MultiPoint(Seq(Point(1,1))) val ml = MultiLineString(Seq()) - mp | ml should be (MultiPointResult(Seq(Point(1,1)).toMultiPoint)) + mp | ml shouldBe PointResult(Point(1,1)) } it ("should union with a MultiLineString and return a MultiPoint") { @@ -188,7 +188,7 @@ class MultiPointSpec extends AnyFunSpec with Matchers { it ("should union with an empty MultiPolygon and return a MultiPointResult") { val mpt = MultiPoint(Seq(Point(1,1))) val mp = MultiPolygon(Seq()) - mpt | mp should be (MultiPointResult(Seq(Point(1,1)).toMultiPoint)) + mpt | mp shouldBe PointResult(Point(1,1)) } it ("should union with a MultiPolygon and return a PolygonResult") { diff --git a/version.sbt b/version.sbt index d726429f71..f5c9d0c051 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "3.6.1-SNAPSHOT" +ThisBuild / version := "3.7.0-SNAPSHOT"