Skip to content

Commit 3e953ba

Browse files
Fix: select dual access thresholds when generating single cutoff grids
1 parent c17c13e commit 3e953ba

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/com/conveyal/analysis/controllers/RegionalAnalysisController.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,13 @@ private Object getAllRegionalResults (Request req, Response res) throws IOExcept
305305
GridResultType gridResultType = determineGridResultType(analysis);
306306
for (String destinationPointSetId : analysis.destinationPointSetIds) {
307307
OpportunityDataset destinations = getDestinations(destinationPointSetId, userPermissions);
308-
for (int cutoffMinutes : analysis.cutoffsMinutes) {
308+
int[] thresholds = gridResultType.equals(GridResultType.DUAL_ACCESS)
309+
? analysis.request.dualAccessThresholds
310+
: analysis.cutoffsMinutes;
311+
for (int threshold : thresholds) {
309312
for (int percentile : analysis.travelTimePercentiles) {
310313
HumanKey gridKey = getSingleCutoffGrid(
311-
analysis, destinations, cutoffMinutes, percentile, gridResultType, FileStorageFormat.GEOTIFF
314+
analysis, destinations, threshold, percentile, gridResultType, FileStorageFormat.GEOTIFF
312315
);
313316
humanKeys.add(gridKey);
314317
progressListener.increment();

0 commit comments

Comments
 (0)