Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
juliohm committed Mar 19, 2024
1 parent 5f825b4 commit 13a66e4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GeoArtifacts"
uuid = "2a3f1dca-97a5-4513-bfd8-b69f0106a87e"
authors = ["Elias Carvalho <eliascarvdev@gmail.com> and contributors"]
version = "0.2.5"
version = "0.3.0"

[deps]
GADM = "a8dd9ffe-31dc-4cf5-a379-ea69100a8233"
Expand All @@ -18,6 +18,6 @@ GeoIO = "1.1"
GeoStatsImages = "1.1"
GeoTables = "1.8"
INMET = "1.0"
Meshes = "0.40"
Meshes = "0.41"
Unitful = "1.17"
julia = "1.9"
13 changes: 3 additions & 10 deletions src/gadm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,19 @@ using GeoTables
import GADM as GADMData

"""
GADM.get(country, subregions...; depth=0, ϵ=nothing,
min=3, max=typemax(Int), maxiter=10, fix=true)
GADM.get(country, subregions...; depth=0, fix=true)
(Down)load GADM table and convert the `geometry` column to Meshes.jl geometries.
(Down)load GADM table and convert the result into a `GeoTable`.
The `depth` option can be used to return tables for subregions
at a given depth starting from the given region specification.
The options `ϵ`, `min`, `max` and `maxiter` are forwarded to the
`decimate` function from Meshes.jl to reduce the number of vertices.
The option `fix` can be used to fix orientation and degeneracy
issues with polygons.
"""
function get(country, subregions...; depth=0, ϵ=nothing, min=3, max=typemax(Int), maxiter=10, fix=true, kwargs...)
table = GADMData.get(country, subregions...; depth, kwargs...)
geotable = GeoIO.asgeotable(table, fix)
dom = domain(geotable)
newdom = decimate(dom, ϵ; min, max, maxiter)
georef(values(geotable), newdom)
GeoIO.asgeotable(table, fix)
end

end
16 changes: 8 additions & 8 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ using Test
@test names(gtb) == ["facies", "geometry"]
end

# @testset "GADM.jl" begin
# gtb = GADM.get("SVN", depth=1, ϵ=0.04)
# @test length(gtb.geometry) == 12
@testset "GADM.jl" begin
gtb = GADM.get("SVN", depth=1)
@test length(gtb.geometry) == 12

# gtb = GADM.get("QAT", depth=1, ϵ=0.04)
# @test length(gtb.geometry) == 7
gtb = GADM.get("QAT", depth=1)
@test length(gtb.geometry) == 7

# gtb = GADM.get("ISR", depth=1)
# @test length(gtb.geometry) == 7
# end
gtb = GADM.get("ISR", depth=1)
@test length(gtb.geometry) == 7
end

@testset "INMET.jl" begin
# automatic stations
Expand Down

2 comments on commit 13a66e4

@juliohm
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
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 created: JuliaRegistries/General/103207

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

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 v0.3.0 -m "<description of version>" 13a66e4d84f8f4b10b981a9c9d32a7967546a52f
git push origin v0.3.0

Please sign in to comment.