Skip to content

Commit

Permalink
Need to rename function names and add TiltRegion method
Browse files Browse the repository at this point in the history
  • Loading branch information
natgeo-wong committed Sep 7, 2024
1 parent 191b215 commit 0cc6c08
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/isin/georegion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function isinGeoRegion(

@info "$(modulelog()) - Performing a check to determine if the $(Child.name) GeoRegion ($(Child.ID)) is inside the $(polyG.name) GeoRegion ($(polyG.ID))"

lon,lat = coordGeoRegion(Child,n=n)
lon,lat = coordinates(Child,n=n)
npts = length(lon)

isin = 0
Expand Down
17 changes: 17 additions & 0 deletions src/isin/point.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,23 @@ function isinGeoRegion(

end

function isinGeoRegion(
Point :: Point2{<:Real},
GeoReg :: TiltRegion;
tlon :: Real = 0,
tlat :: Real = 0,
throw :: Bool = true
)

@info "$(modulelog()) - Performing a check to determine if the $(Child.name) GeoRegion ($(Child.ID)) is inside the $(tiltG.name) GeoRegion ($(tiltG.ID))"

lon,lat = getTiltShape(GeoReg)
tgeo = PolyRegion("","","",lon,lat,save=false,verbose=false)

isinGeoRegion(Point,tgeo,tlon=tlon,tlat=tlat,throw=throw)

end

function isinGeoRegion(
Point :: Point2{<:Real},
GeoReg :: PolyRegion;
Expand Down

0 comments on commit 0cc6c08

Please sign in to comment.