Skip to content

Commit

Permalink
Fix isgeometry on GFT. (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
evetion authored Jan 13, 2025
1 parent 4f89768 commit dd95d28
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ uuid = "0f680547-7be7-4555-8820-bb198eeb646b"
authors = [
"Maarten Pronk <[email protected]> and contributors."
]
version = "0.2.5"
version = "0.2.6"

[deps]
GeoFormatTypes = "68eda718-8dee-11e9-39e7-89f7f65f511f"
Expand Down
1 change: 1 addition & 0 deletions src/wkb.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ function check_endianness(data)
end

GI.isgeometry(::WKBtype) = true
GI.isgeometry(::Type{<:GFT.WellKnownBinary}) = true

function GI.geomtrait(geom::WKBtype)
check_endianness(geom.val)
Expand Down
1 change: 1 addition & 0 deletions src/wkt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ end
# Implement GeoInterface for WKT, as wrapped by GeoFormatTypes
const WKTtype = GFT.WellKnownText{GFT.Geom}
GI.isgeometry(::WKTtype) = true
GI.isgeometry(::Type{<:GFT.WellKnownText{GFT.Geom}}) = true

Base.getindex(wkt::WKTtype, i) = GFT.WellKnownText(gftgeom, wkt.val[i])
Base.lastindex(wkt::WKTtype) = lastindex(wkt.val)
Expand Down
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ import LibGEOS
wkb = GFT.WellKnownBinary(GFT.Geom(), [0x0])

@test GI.isgeometry(wkt)
@test GI.isgeometry(typeof(wkt))
@test GI.isgeometry(wkb)
@test GI.isgeometry(typeof(wkb))

wkt = GFT.WellKnownText(GFT.Geom(), "POINT (30 10)")
@test GI.testgeometry(wkt)
Expand Down

2 comments on commit dd95d28

@evetion
Copy link
Owner 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/122898

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.2.6 -m "<description of version>" dd95d28bd22df93f734c93ffd5afb1dfe1d18c68
git push origin v0.2.6

Also, note the warning: Version 0.2.6 skips over 0.2.5
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.