-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: main
Are you sure you want to change the base?
Conversation
ext/GeometryOpsDimensionalDataExt/GeometryOpsDimensionalDataExt.jl
Outdated
Show resolved
Hide resolved
import GeometryOps as GO | ||
import GeoInterface as GI | ||
|
||
function GO.polygonize(A::DD.AbstractDimArray; dims=(DD.X(), DD.Y()), crs=GI.crs(A), kw...) |
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.
What happens with the dims that aren't given (time etc)?
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.
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?
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.
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
.
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.
Do we then want to add an assert here that the dims can only have length 2?
Does that last commit set minimum version to Julia 1.10 instead of 1.9? |
Oops wrong commit message, we can fix it in the squash |
Is this just waiting on the datacube stuff/implementation? |
Waiting for me to have time 😭 |
This adds a DD extension for
polygonize
so that any DD array can be polygonized with X/Y (or custom withdims
keyword) lookup values.