Skip to content

Commit

Permalink
Merge branch 'release/4.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadain committed May 17, 2018
2 parents ae87a10 + 1145c9a commit 0f93ab6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## 4.0.1

- Update `/multi` endpoint to take a set of shapes and a
MultiLine string of streamLines, such that there may be
shapes that do not intersect any of the streamLines at
all, and still return results. Previously this would
cause a 500 with the following error:

java.util.NoSuchElementException: None.get

Now we simply return that operation with an empty object,
like so:

"nlcd_streams": {},

## 4.0.0

- Add a new `/multi` endpoint that can take a set of shapes,
Expand Down
9 changes: 7 additions & 2 deletions api/src/main/scala/Geoprocessing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,13 @@ trait Geoprocessing extends Utils {
case "RasterLinesJoin" =>
input.streamLines match {
case Some(mls) => {
val lines = (parseMultiLineString(mls) & shape).asMultiLine.get
rasterLinesJoin(layers, Seq(lines)).mapValues(_.toDouble)
(parseMultiLineString(mls) & shape).asMultiLine match {
case Some(lines) =>
rasterLinesJoin(layers, Seq(lines))
.mapValues(_.toDouble)
case None =>
Map[String, Double]()
}
}
case None =>
throw new MissingStreamLinesException
Expand Down
2 changes: 1 addition & 1 deletion project/build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object Geoprocessing extends Build {
super.settings ++
Seq(
shellPrompt := { s => Project.extract(s).currentProject.id + " > " },
version := "4.0.0",
version := "4.0.1",
scalaVersion := Version.scala,
organization := "org.wikiwatershed.mmw.geoprocessing",
name := "mmw-geoprocessing",
Expand Down

0 comments on commit 0f93ab6

Please sign in to comment.