Skip to content

Commit

Permalink
Update, with a bug found in RegionGrid
Browse files Browse the repository at this point in the history
  • Loading branch information
natgeo-wong committed Jun 24, 2021
1 parent f76b279 commit e04299f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GeoRegions"
uuid = "b001f823-fa75-4bff-bf55-6610c8f3688a"
authors = ["natgeo-wong <[email protected]>"]
version = "2.0.0"
version = "2.0.1"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
2 changes: 1 addition & 1 deletion src/Extract.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function RegionGrid(
mask = Array{FT,2}(undef,length(nlon),length(nlat))
for ilat = 1 : length(nlat), ilon = 1 : length(nlon)
ipnt = Point2(nlon[ilon],nlat[ilat])
if isPointinGeoRegion(ipnt,geo,throw=false)
if isinGeoRegion(ipnt,geo,throw=false)
mask[ilon,ilat] = 1
else; mask[ilon,ilat] = NaN
end
Expand Down
6 changes: 3 additions & 3 deletions src/IsInGeoRegion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ function isinGeoRegion(
mask = zeros(Bool,nlon,nlat)

for ilat in 1 : nlat, ilon = 1 : nlon
if isPointinGeoRegion(Point2(lon[ilon],lat[ilat]),Child,throw=false)
if !isPointinGeoRegion(Point2(lon[ilon],lat[ilat]),GeoReg,throw=false)
if isinGeoRegion(Point2(lon[ilon],lat[ilat]),Child,throw=false)
if !isinGeoRegion(Point2(lon[ilon],lat[ilat]),GeoReg,throw=false)
mask[ilon,ilat] = 1
end
end
Expand Down Expand Up @@ -251,7 +251,7 @@ function isinGeoRegion(

isin = isgridinregion(
[Child.N,Child.S,Child.E,Child.W],
[GeoReg.N,GeoReg.S,GeoReg.E,GeoReg,W],
[GeoReg.N,GeoReg.S,GeoReg.E,GeoReg.W],
throw=false
)

Expand Down

2 comments on commit e04299f

@natgeo-wong
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release Notes:

  • Debugging some errors created due to last-minute function name changes

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/39579

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v2.0.1 -m "<description of version>" e04299f726b5541d09d6f075c0a1b4e71cd1ddec
git push origin v2.0.1

Please sign in to comment.