From ce711eeaf26d8f9aad613ddc641b8e127ffaa388 Mon Sep 17 00:00:00 2001 From: Anson Stewart Date: Thu, 6 Apr 2023 16:16:06 -0400 Subject: [PATCH] Geotiff output: set unreachable cells to 999 --- .../com/conveyal/r5/analyst/cluster/TimeGridWriter.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/conveyal/r5/analyst/cluster/TimeGridWriter.java b/src/main/java/com/conveyal/r5/analyst/cluster/TimeGridWriter.java index c057c0912..ba79e252e 100644 --- a/src/main/java/com/conveyal/r5/analyst/cluster/TimeGridWriter.java +++ b/src/main/java/com/conveyal/r5/analyst/cluster/TimeGridWriter.java @@ -161,7 +161,11 @@ public void writeGeotiff (OutputStream out) { for (int x = 0; x < extents.width; x++) { for (int n = 0; n < travelTimeResult.nSamplesPerPoint; n++) { val = travelTimeResult.values[n][(y * extents.width + x)]; - if (val < FastRaptorWorker.UNREACHED) raster.setSample(x, y, n, val); + if (val < FastRaptorWorker.UNREACHED) { + raster.setSample(x, y, n, val); + } else { + raster.setSample(x, y, n, 999); + } } } } @@ -199,4 +203,4 @@ public void writeGeotiff (OutputStream out) { } -} \ No newline at end of file +}