Skip to content
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

Forward GeoInterface.centroid #365

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

asinghvi17
Copy link
Contributor

@asinghvi17 asinghvi17 commented Jan 19, 2023

This doesn't work for FeatureCollections yet, and no tests have been added. It's essentially a quick and dirty implementation where I extended the type constraints on the main GeoInterface.convert method and implemented ArchGDAL.geointerface_geomtype(arg) = IGeometry. Since it operates on traits, it seemed a fair bet, and any feature-like object can of course be overloaded.

Changed the PR to just forward GeoInterface.centroid, which seemed to be missing.

src/geointerface.jl Outdated Show resolved Hide resolved
@rafaqz
Copy link
Collaborator

rafaqz commented Jan 19, 2023

This is already tested as working. But yes we also need to handle features somehow. I guess I should have handle that in GeoInterface as well.

Noticed that this was missing, so decided to correct it.
@asinghvi17 asinghvi17 changed the title Allow GeoInterface.convert(ArchGDAL, obj) to "just work" Forward GeoInterface.centroid Jan 26, 2023
@rafaqz
Copy link
Collaborator

rafaqz commented Jan 26, 2023

A test ?

for polygon and multipolygon within test_geometry.jl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants