Skip to content

Commit

Permalink
Changed checking for NaN in Float64GeoTiffSegmentCollection to java.l…
Browse files Browse the repository at this point in the history
…ang.Double.isNaN

Signed-off-by: jbouffard <jbouffard@azavea.com>
  • Loading branch information
jbouffard committed Dec 14, 2016
1 parent 561b76e commit 3c0d4cd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ trait Float64GeoTiffSegmentCollection extends GeoTiffSegmentCollection {

lazy val createSegment: Int => Float64GeoTiffSegment = noDataValue match {
case None =>
(i: Int, bytes: Array[Byte]) => new Float64RawGeoTiffSegment(decompressor.decompress(bytes, i))
case Some(nd) if nd.isNaN =>
(i: Int, bytes: Array[Byte]) => new Float64ConstantNoDataGeoTiffSegment(decompressor.decompress(bytes, i))
{ i: Int => new Float64RawGeoTiffSegment(getDecompressedBytes(i)) }
case Some(nd) if java.lang.Double.isNaN(nd) =>
{ i: Int => new Float64ConstantNoDataGeoTiffSegment(getDecompressedBytes(i)) }
case Some(nd) =>
{ i: Int => new Float64UserDefinedNoDataGeoTiffSegment(getDecompressedBytes(i), nd) }
}
Expand Down

0 comments on commit 3c0d4cd

Please sign in to comment.