Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- breaking: Updated compat for GDAL.jl 1.5 and fixed tests for GDAL 3.6. These include changes to `gdalnearblack`, `fillunsetwithdefault!` and `gdalgetgeotransform`.
- breaking: Use `GeoInterface.convert` instead of `convert` to convert geometries from other
packages to ArchGDAL via the GeoInterface. Example: `GeoInterface.convert(AG.IGeometry, geom)`

## [0.9.4] - 2022-12-30

Expand Down
15 changes: 1 addition & 14 deletions src/geointerface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -278,20 +278,7 @@ let pointtypes = (wkbPoint, wkbPoint25D, wkbPointM, wkbPointZM),
return toWKT(geom)
end

function Base.convert(::Type{T}, geom::X) where {T<:IGeometry,X}
return Base.convert(T, GeoInterface.geomtrait(geom), geom)
end
function Base.convert(
::Type{T},
::GeometryTraits,
geom::T,
) where {T<:IGeometry}
return geom
end # fast fallthrough without conversion
function Base.convert(::Type{T}, ::Nothing, geom::T) where {T<:IGeometry}
return geom
end # fast fallthrough without conversion
function Base.convert(
function GeoInterface.convert(
::Type{T},
type::GeometryTraits,
geom,
Expand Down
2 changes: 1 addition & 1 deletion test/test_geometry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ import GeoFormatTypes as GFT
GI.getgeom(::GI.LineStringTrait, geom::MyLine, i) = MyPoint()

geom = MyLine()
ag_geom = convert(AG.IGeometry, geom)
ag_geom = GI.convert(AG.IGeometry, geom)
GI.coordinates(ag_geom) == [[1, 2], [1, 2]]
end
end