From 20853613207b5db6365e51b2a406a46296dfff64 Mon Sep 17 00:00:00 2001 From: Nathanael Wong Date: Sat, 7 Sep 2024 14:13:28 -0400 Subject: [PATCH] `addGeoRegion()` actually doesn't serve a purpose, replace with `add()` --- src/GeoRegions.jl | 4 +--- src/georegions/add.jl | 38 ++++++++++++++++---------------------- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/src/GeoRegions.jl b/src/GeoRegions.jl index 646a8ab9..b409b058 100644 --- a/src/GeoRegions.jl +++ b/src/GeoRegions.jl @@ -16,9 +16,7 @@ export RectRegion, PolyRegion, TiltRegion, ==, isGeoRegion, isID, - add, addGeoRegion, - rm, rmID, - overwrite, + add, rm, rmID, overwrite, templateGeoRegions, readGeoRegions, addGeoRegions, resetGeoRegions, tableGeoRegions, tableRectRegions, tableTiltRegions, tablePolyRegions, diff --git a/src/georegions/add.jl b/src/georegions/add.jl index 92d4e407..c4bf74e1 100644 --- a/src/georegions/add.jl +++ b/src/georegions/add.jl @@ -1,23 +1,4 @@ -add( - geo :: GeoRegion; - path :: AbstractString = dirname(geo.path), - verbose :: Bool = true -) = addGeoRegion(geo,path,verbose=verbose) - -function overwrite( - geo :: GeoRegion; - path :: AbstractString, - verbose :: Bool = true -) - - rmID(geo.ID,path=path) - add(geo,path=path,verbose=verbose) - - return nothing - -end - -function addGeoRegion( +function add( geo :: RectRegion, path :: AbstractString = dirname(geo.path); verbose :: Bool = true @@ -33,7 +14,7 @@ function addGeoRegion( end -function addGeoRegion( +function add( geo :: TiltRegion, path :: AbstractString = dirname(geo.path); verbose :: Bool = true @@ -49,7 +30,7 @@ function addGeoRegion( end -function addGeoRegion( +function add( geo :: PolyRegion, path :: AbstractString = dirname(geo.path); verbose :: Bool = true @@ -65,4 +46,17 @@ function addGeoRegion( return nothing +end + +function overwrite( + geo :: GeoRegion; + path :: AbstractString, + verbose :: Bool = true +) + + rmID(geo.ID,path=path) + add(geo,path=path,verbose=verbose) + + return nothing + end \ No newline at end of file