Skip to content

Commit

Permalink
Merge branch 'release/0.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
caseycesari committed Dec 2, 2015
2 parents 97041e3 + 6e3d3fb commit 510f65d
Show file tree
Hide file tree
Showing 57 changed files with 294 additions and 146 deletions.
22 changes: 0 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,6 @@ deploy:
api_key:
secure: NllnEN36jPxZLvTmLb/JN9Eh5wOlMV5Q/FwSQe/OqCHF2WWasdlAW+CHT2m0gb0cLb9NqwwoFRDJcqYn+XFCuK5Gboc9s6/rQe9oj3EeiyO75lF2XzVLF+MQxvbnb6X9XCFAs7ezcEVBbpM5Yaaclx9bT7WodrFD/s5+09RS5NMZBKZe2UyZmfz1oKIFWLCEvpau+VXnLFZX5z2R41ZBtLBORAuQrjGRs6ed/QXtLtBwQjRcsnlchhk7LAC1LfPIoTWzC8vkiQyLXMjVFTcTeKcHdec6txiSesciCAvEwE/grAfOKp1YCXdjXzYthnwL2V+vc1X9IcNTOyQEBuQArquw1pmA9PjKZm4GU93Om9DflZgy/oHqxiCKrauvyc1c8R5e4kGsIbl+lkgcFu/P4QutEXC8U50z+qS5HGr9hKJDV9te+z4mzbvbvVahWlwBXUOk48maPWTRS7FaRBTvOqaizgow9tuy9on3bTc5GTwyQhAxu6v6NvcMvE2e/JvZWKTVR7H+pR9nKwF+LbnsYu+ZPwX8qtkhl/HX9xDd0RuSDXx8izywV25BpuwapNKHOCLWW4suZKFvoKz6xZ5r5fcIOJVVTHwXuMTezQH9dCkdqA0olrRWn07VSdWeJJM3N+DTVS0nsW03o8KvImiNtHtXdS3hf85xInlBgVWq4AA=
file:
- sample/breaks/nlcd.data
- sample/breaks/tr.data
- sample/layers/canopy2001.json
- sample/layers/census2010popsqmi.json
- sample/layers/census2010popsqmiQuantile.json
- sample/layers/census2010totalpop.json
- sample/layers/census2010totalpopQuantile.json
- sample/layers/census2013income.json
- sample/layers/census2013incomeQuantile.json
- sample/layers/elevation.json
- sample/layers/impervious2001.json
- sample/layers/impervious2011.json
- sample/layers/landcover2006.json
- sample/layers/landcover2011.json
- sample/layers/landsatBlue.json
- sample/layers/landsatGreen.json
- sample/layers/landsatNir.json
- sample/layers/landsatRed.json
- sample/layers/nlcd.json
- sample/layers/reclass2011.json
- sample/layers/trees2011.json
- sample/layers/water2011.json
- target/scala-2.10/modellab-geoprocessing-assembly-${TRAVIS_TAG}.jar
skip_cleanup: true
on:
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## 0.4.2

- Fix color breaks for NDVI, VARI, and VGI.

## 0.4.1

- The static configuration files for layers and color breaks have been moved into the .jar file.
- The Geotrellis dependency has been updated to enable floating-point color breaks.
- Many new color breaks have been added.
- A bug relating to how "LocalUnary*" operations are echoed has been fixed.
- A "ConvertToFloat" operation has been added to allow floating-point rasters to result from integer-raster inputs.

## 0.4.0

- Added operation for masking values between specified ranges.
- Ensure application shuts down if AWS credentials cannot be determined.

## 0.3.0

- Added the remaining focal and local functions that are implemented in GeoTrellis.
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
organization := "com.azavea.modellab"
name := "modellab-geoprocessing"
version := "0.3.0"
version := "0.4.2"

Common.settings

Expand Down
4 changes: 2 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sbt._

object Version {
val geotrellis = "0.10.0-83483fc"
val geotrellis = "0.10.0-5435775"
val logback = "1.1.2"
val scala = "2.10.6"
val scalaTest = "2.2.0"
Expand All @@ -26,4 +26,4 @@ object Library {
val metrics = "nl.grons" %% "metrics-scala" % "3.5.2_a2.3"
val metricsLibrato = "com.librato.metrics" % "metrics-librato" % "4.0.1.12"
val config = "com.typesafe" % "config" % "1.2.1"
}
}
1 change: 0 additions & 1 deletion sample/breaks/tr.data

This file was deleted.

6 changes: 0 additions & 6 deletions sample/other/Layer definition.txt

This file was deleted.

6 changes: 0 additions & 6 deletions sample/other/List Layers.txt

This file was deleted.

20 changes: 10 additions & 10 deletions sample/tools/FocalSlope.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "FocalSlope",
"neighborhood": {
"shape": "square",
"size": 1
},
"z_factor": 1,
"inputs": [
"GVWWZ5Y"
]
}
"name": "FocalSlope",
"neighborhood": {
"shape": "square",
"size": 1
},
"z_factor": 1,
"inputs": [
"GVWWZ5Y"
]
}
22 changes: 10 additions & 12 deletions sample/tools/FocalSum.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"name": "FocalMin",
"neighborhood": {
"shape": "square",
"size": 1
},
"inputs": [
{
"name": "LoadLayer",
"layer_name": "nlcd-zoomed"
}
]
}
"name": "FocalMin",
"neighborhood": {
"shape": "square",
"size": 1
},
"inputs": [{
"name": "LoadLayer",
"layer_name": "nlcd-zoomed"
}]
}
22 changes: 11 additions & 11 deletions sample/tools/ReclassifyCities.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "MapValues",
"mappings": [
[ [21,22,23,24], null ]
],
"inputs": [
{
"name": "LoadLayer",
"layer_name": "nlcd-zoomed"
}
]
}
"name": "MapValues",
"mappings": [
[
[21, 22, 23, 24], null
]
],
"inputs": [{
"name": "LoadLayer",
"layer_name": "nlcd-zoomed"
}]
}
37 changes: 17 additions & 20 deletions sample/tools/Roughness.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
{
"name": "LocalSubtract",
"inputs": [
{
"name": "FocalMax",
"neighborhood": {
"shape": "square",
"size": 1
},
"inputs": ["GVWWZ5Y"]
},
{
"name": "FocalMin",
"neighborhood": {
"shape": "square",
"size": 1
},
"inputs": ["GVWWZ5Y"]
}
]
}
"name": "LocalSubtract",
"inputs": [{
"name": "FocalMax",
"neighborhood": {
"shape": "square",
"size": 1
},
"inputs": ["GVWWZ5Y"]
}, {
"name": "FocalMin",
"neighborhood": {
"shape": "square",
"size": 1
},
"inputs": ["GVWWZ5Y"]
}]
}
1 change: 1 addition & 0 deletions src/main/resources/breaks/black-0-1.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffffff;1:000000ff
1 change: 1 addition & 0 deletions src/main/resources/breaks/black-0-100.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffffff;20:f7f7f7ff;40:ccccccff;60:969696ff;80:636363ff;100:252525ff
1 change: 1 addition & 0 deletions src/main/resources/breaks/blue-0-1.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffffff;1:3182bdff
1 change: 1 addition & 0 deletions src/main/resources/breaks/blue-0-100.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffffff;20:eff3ffff;40:bdd7e7ff;60:6baed6ff;80:3182bdff;100:08519cff
1 change: 1 addition & 0 deletions src/main/resources/breaks/cm.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffccff;100:c7e9b4ff;200:7fcdbbff;300:41b6c4ff;400:1d91c0ff;500:225ea8ff;600:0c2c84ff
1 change: 1 addition & 0 deletions src/main/resources/breaks/dosc.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-1:b4b2b4ff;0:ff0000ff;22:ff9e00ff;67:faff00ff;112:00ff06ff;157:00ffffff;202:00a9ffff;247:2000ffff;292:ff00fcff;337:ff0000ff
1 change: 1 addition & 0 deletions src/main/resources/breaks/elevation.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffffff;10:FCF7F2ff;20:F5E4D7ff;30:E7C8B7ff;40:DAAFA0ff;50:D19587ff;60:C4766Dff;70:B85B59ff;80:A94950ff;90:973847ff;100:82293Eff;150:701E38ff;200:5D1230ff;250:480A28ff;300:360722ff;350:240318ff;400:0F000Bff
1 change: 1 addition & 0 deletions src/main/resources/breaks/green-0-1.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffffff;1:41ab5dff
1 change: 1 addition & 0 deletions src/main/resources/breaks/green-0-100.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffffff;20:edf8e9ff;40:bae4b3ff;60:74c476ff;80:31a354ff;100:006d2cff
1 change: 1 addition & 0 deletions src/main/resources/breaks/landsat.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffffff;1500:a1a1a1ff;3000:999999ff;4500:909090ff;6000:7f7f7fff;7500:777777ff;9000:6e6e6eff;10500:666666ff;12000:5d5d5dff;13500:555555ff;15000:4c4c4cff;16500:444444ff;18000:3b3b3bff;19500:333333ff;21000:2a2a2aff;22500:222222ff;24000:191919ff;25500:111111ff;27000:080808ff;28500:000000ff;30000:000000ff;100000:000000ff
1 change: 1 addition & 0 deletions src/main/resources/breaks/ndvi.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffe5ff;0.1:f7fcb9ff;0.2:d9f0a3ff;0.3:addd8eff;0.4:78c679ff;0.5:41ab5dff;0.6:238443ff;0.7:006837ff;1:004529ff
1 change: 1 addition & 0 deletions src/main/resources/breaks/nlcd-reclass.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffffff;1:38814eff;2:af963cff;4:5475a8ff;5:e29e8cff;6:ff0000ff;7:b50000ff;31:d2cdc0ff
File renamed without changes.
1 change: 1 addition & 0 deletions src/main/resources/breaks/purple-0-100000.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffffff;10000:fcfbfdff;20000:efedf5ff;30000:dadaebff;40000:bcbddcff;50000:9e9ac8ff;60000:807dbaff;70000:6a51a3ff;80000:54278fff;90000:3f007dff;100000:000000ff
1 change: 1 addition & 0 deletions src/main/resources/breaks/red-0-1000.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffffff;100:fff7ecff;200:fee8c8ff;300:fdd49eff;400:fdbb84ff;500:fc8d59ff;600:ef6548ff;700:d7301fff;800:b30000ff;900:7f0000ff;1000:4c0000ff
1 change: 1 addition & 0 deletions src/main/resources/breaks/rosc.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:00ff03ff;15:00ff00ff;23:6eff00ff;31:c4ff00ff;39:fae500ff;47:ffae00ff;55:ff6300ff;63:ff0000ff;71:8B0000ff
1 change: 1 addition & 0 deletions src/main/resources/breaks/tpi.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-10:f92406ff;-5:fc9404ff;0:fafa04ff;5:04f404ff;10:47a108ff
1 change: 1 addition & 0 deletions src/main/resources/breaks/tr.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:2586ABff;1:4EA3C8ff;2:7FB8D4ff;3:ADD8EAff;4:C8E1E7ff;5:EDECEAff;6:F0E7BBff;7:F5CF7Dff;8:F9B737ff;9:E68F2Dff;10:D76B27ff
1 change: 1 addition & 0 deletions src/main/resources/breaks/vari.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:ffffe5ff;0.1:f7fcb9ff;0.2:d9f0a3ff;0.3:addd8eff;0.4:78c679ff;0.5:41ab5dff;0.6:238443ff;0.7:006837ff;1:004529ff
1 change: 1 addition & 0 deletions src/main/resources/breaks/vgi.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0:000000ff;11:967355ff;21:eec591ff;31:ffe4c4ff;41:ffffacff;51:c8ffc8ff;61:96e680ff;71:40c040ff;81:008000ff;91:004000ff
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 0 additions & 25 deletions src/main/resources/sample.json

This file was deleted.

33 changes: 30 additions & 3 deletions src/main/scala/com/azavea/modellab/NodeFormats.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ class NodeFormats(windowedReader: WindowedReader, layerLookup: String => Option[
FocalSlopeFormat.read(json)
case "MapValues" =>
MapValuesFormat.read(json)
case "MapRanges" =>
MapRangesFormat.read(json)
case "ConvertToFloat" =>
CoerceFormat.read(json)
case name if name.startsWith("LocalUnary") =>
LocalUnaryFormat.read(json)
case name if name.startsWith("Local") =>
Expand Down Expand Up @@ -57,6 +61,10 @@ class NodeFormats(windowedReader: WindowedReader, layerLookup: String => Option[
FocalAspectFormat.write(op)
case op: MapValues =>
MapValuesFormat.write(op)
case op: MapRanges =>
MapRangesFormat.write(op)
case op: Coerce =>
CoerceFormat.write(op)
}
}

Expand Down Expand Up @@ -138,6 +146,25 @@ class NodeFormats(windowedReader: WindowedReader, layerLookup: String => Option[
}
}

implicit object CoerceFormat extends JsonFormat[Coerce] {
def read(json: JsValue) = {
Coerce(json.inputs.head)
}

def write(o: Coerce) =
writeNode(o, "ConvertToFloat", "ConvertToFloat" -> true.toJson)
}

implicit object MapRangesFormat extends JsonFormat[MapRanges] {
def read(json: JsValue) = {
val mappings = json.param[Seq[((Double, Double), Option[Double])]]("mappings")
MapRanges(json.inputs.head, mappings)
}

def write(o: MapRanges) =
writeNode(o, s"MapRanges", "mappings" -> o.mappings.toJson)
}

implicit object MapValuesFormat extends JsonFormat[MapValues] {
def read(json: JsValue) = {
val mappings = json.param[Seq[(Seq[Int], Option[Int])]]("mappings")
Expand All @@ -153,8 +180,8 @@ class NodeFormats(windowedReader: WindowedReader, layerLookup: String => Option[
LoadLayer(json.param[String]("layer_name"), windowedReader)
}

def write(o: LoadLayer) =
writeNode(o, s"LoadLayer", "layer_name" -> JsString(o.layerName))
def write(o: LoadLayer) =
writeNode(o, s"LoadLayer", "layer_name" -> JsString(o.layerName))
}

implicit object FocalAspectFormat extends JsonFormat[FocalAspect] {
Expand Down Expand Up @@ -249,7 +276,7 @@ class NodeFormats(windowedReader: WindowedReader, layerLookup: String => Option[
}

def write(o: LocalUnary) =
writeNode(o, s"Local${o.name}", "constant" -> 0.toJson)
writeNode(o, s"${o.name}", "constant" -> 0.toJson)
}

implicit object FocalFormat extends JsonFormat[Focal] {
Expand Down
Loading

0 comments on commit 510f65d

Please sign in to comment.