-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
convert any geometries to gdal types in geometry methods #366
base: master
Are you sure you want to change the base?
Conversation
b113963
to
d860b69
Compare
d860b69
to
84f3955
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR description -- it answered my questions. There doesn't seem to be a way to look at code coverage delta, but LGTM apart from maintaining coverage there. I'll also ask for approval from @visr @evetion since they have context from JuliaGeo/GeoInterface.jl#78
end | ||
|
||
@noinline _not_a_geom_error() = | ||
throw(ArgumentError("Ojbect of type $(typeof(geom)) is not a GeoInterface compatible geometry")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ojbect -> Object
# TODO Add `length` method to match GeoInterface naming conventions? | ||
# this will mean using `Base.length` everywhere |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we turn this into a github issue?
# @test AG.asbinary( | ||
# AG.fromWKT("POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))"), | ||
# )[1:10] == | ||
# UInt8[0x01, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05] | ||
|
||
# @test AG.astext(AG.fromWKT("POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))")) == | ||
# "POLYGON ((0 0,10 0,10 10,0 10,0 0))" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, why are these commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh because they dont exist, but maybe should to match geointerface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh thanks for explaining!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a comment and a github issue, it's basically the same as for length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just found the report of the coverage -- https://app.codecov.io/gh/yeesian/ArchGDAL.jl/pull/366 and it seems a good number of methods still needs coverage
Yeah im slowly working through them |
Add methods to operations like
disjoint
,crosses
etc to accept arbitrary GeoInterface.jl compatible geometries and convert them to ArchGDAL geometries with the sharedto_gdal
method andgeointerface_geomtype
.The returned values are always still
ArchGDAL
geometries.We don't use
convert(ArchGDAL, geom)
here as it has a small overhead to call a pacage method, which is unnecessary to pay locally - especially for points of anything there are a lot of.Needs tests, and JuliaGeo/GeoInterface.jl#78