From ad0efca6615e2d1ad77251ec1f4d64733eebb823 Mon Sep 17 00:00:00 2001 From: Riccardo Boero <ribo@nilu.no> Date: Thu, 4 Apr 2024 09:23:16 +0200 Subject: [PATCH] Moved elevation and road distance values to sentinel ones (-9999) instead of nothing --- src/FACT_elevation.jl | 12 ++++++------ src/FACT_road.jl | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/FACT_elevation.jl b/src/FACT_elevation.jl index c5f7942..1f115a9 100644 --- a/src/FACT_elevation.jl +++ b/src/FACT_elevation.jl @@ -34,12 +34,12 @@ function elevation_data_full(ws_host_port::String, selection::Dict) for (id, shape) in zip(geo_id, shape_obj) # setting starting values to nothing - min_elevation = nothing - max_elevation = nothing - mean_elevation = nothing - std_elevation = nothing - median_elevation = nothing - entropy_elevation = nothing + min_elevation = -9999 #sentinel value + max_elevation = -9999 #sentinel value + mean_elevation = -9999 #sentinel value + std_elevation = -9999 #sentinel value + median_elevation = -9999 #sentinel value + entropy_elevation = -9999 #sentinel value # Construct the JSON payload diff --git a/src/FACT_road.jl b/src/FACT_road.jl index 88819f3..200bc3d 100644 --- a/src/FACT_road.jl +++ b/src/FACT_road.jl @@ -49,7 +49,7 @@ function travel_time_in_minutes(ws_host_port::String, selection::Dict) # Construct the request URL url = "$ws_host_port/route/v1/driving/$(start_longitude),$(start_latitude);$(end_longitude),$(end_latitude)?overview=false" - travel_time = nothing # Use `nothing` to represent null in Julia + travel_time = -9999 #sentinel value try # Make the request -- GitLab