Skip to content

Commit

Permalink
update for GeoJSON 0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Jul 10, 2022
1 parent 7022f7d commit 6d3f6f7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
[compat]
CFTime = "0.1"
DataStructures = "0.18"
GeoJSON = "0.5, 0.6"
GeoJSON = "0.6"
HTTP = "0.9, 1"
JSON3 = "1"
LRUCache = "1"
Expand Down
2 changes: 1 addition & 1 deletion src/item.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export DateTime
Get the geometry of STAC `item` as a GeoJSON object
"""
geometry(item::Item) = GeoJSON.dict2geo(item.data[:geometry])
geometry(item::Item) = GeoJSON.geometry(item.data[:geometry])
export geometry

function Item(url)
Expand Down
22 changes: 11 additions & 11 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ end
url = "https://raw.githubusercontent.com/sat-utils/sat-stac/master/test/catalog/catalog.json"

cat = STAC.Catalog(url)
@show id(cat)
@show type(cat)
@show stac_version(cat)
@show stac_extensions(cat)
@show title(cat)
@show description(cat)
@show keywords(cat)
@show license(cat)
@show providers(cat)
@show extent(cat)

@test id(cat) == "stac-catalog"
@test occursin("1.",stac_version(cat))
@test stac_extensions(cat) == nothing
@test title(cat) == nothing
@test description(cat) == "An example STAC catalog"
@test keywords(cat) == nothing
@test license(cat) == nothing
@test providers(cat) == nothing
@test extent(cat) == nothing
@test summaries(cat, default = "foobar") == "foobar"

@test length(keys(cat)) > 0
@show keys(cat)
@test keys(cat) == ["stac-catalog-eo"]

subcat = cat["stac-catalog-eo"]
@show subcat
Expand Down

2 comments on commit 6d3f6f7

@Alexander-Barth
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/75262

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.1.0 -m "<description of version>" 6d3f6f78c893491d0059d2def133ee2591aa9839
git push origin v0.1.0

Please sign in to comment.