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

add DimensionalData extension #178

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

add DimensionalData extension #178

wants to merge 6 commits into from

Conversation

rafaqz
Copy link
Member

@rafaqz rafaqz commented Jul 14, 2024

This adds a DD extension for polygonize so that any DD array can be polygonized with X/Y (or custom with dims keyword) lookup values.

import GeometryOps as GO
import GeoInterface as GI

function GO.polygonize(A::DD.AbstractDimArray; dims=(DD.X(), DD.Y()), crs=GI.crs(A), kw...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens with the dims that aren't given (time etc)?

Copy link
Member Author

@rafaqz rafaqz Jul 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I haven't done that yet, this should be WIP.

But I image we make a feature collection with a feature for each slice, and put the lookup values as properties?

Otherwise return a DimArray of geoms of the remaining dimensions ?

Probably a single feature collection or table is most useful?

Copy link
Member Author

@rafaqz rafaqz Jul 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this is a case for R style vector data cubes.

But we can just broadcast over the other dimensions and get a DimArray of X/Y geometries with time/etc dimensions.

We should be able to write that directly as a FeatureCollection with GeoJSON/ArchGDAL/Shapefile without any more work as long as we name the array :geometry.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we then want to add an assert here that the dims can only have length 2?

@asinghvi17
Copy link
Member

Does that last commit set minimum version to Julia 1.10 instead of 1.9?

@rafaqz
Copy link
Member Author

rafaqz commented Jul 15, 2024

Oops wrong commit message, we can fix it in the squash

@asinghvi17
Copy link
Member

Is this just waiting on the datacube stuff/implementation?

@rafaqz
Copy link
Member Author

rafaqz commented Aug 27, 2024

Waiting for me to have time 😭

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.

2 participants