From 38874ccd16dd0ef650c1dbce1f344e1e70d228bd Mon Sep 17 00:00:00 2001 From: Nathanael Wong Date: Sat, 7 Sep 2024 16:44:12 -0400 Subject: [PATCH] Reorder order of if-else --- src/isin/georegion.jl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/isin/georegion.jl b/src/isin/georegion.jl index a4f04c11..721f0bc8 100644 --- a/src/isin/georegion.jl +++ b/src/isin/georegion.jl @@ -153,7 +153,12 @@ function isinGeoRegion( end end - if isin > 0 + if iszero(isin) + + @info "$(modulelog()) - The GeoRegion $(Child.ID) ($(Child.name)) is indeed a subset of the GeoRegion $(polyG.ID) ($(polyG.name))" + return true + + else if throw error("$(modulelog()) - The GeoRegion $(Child.ID) ($(Child.name)) is not a subset of the GeoRegion $(polyG.ID) ($(polyG.name))") @@ -162,9 +167,6 @@ function isinGeoRegion( return false end - else - @info "$(modulelog()) - The GeoRegion $(Child.ID) ($(Child.name)) is indeed a subset of the GeoRegion $(polyG.ID) ($(polyG.name))" - return true end end