-
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
Using polygonize function on a raster doesn't keep the original raster coordinates #199
Comments
I can confirm locally...guess our tests for DimensionalData and Rasters were a bit lacking. #200 should fix this but it might take a few days. Thanks for the bug report! |
Specifically this is because ( julia> axes(evil)[1]
DimensionalData.Dimensions.DimUnitRange(Base.OneTo(100), X{Projected{Int64, UnitRange{Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Int64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata, EPSG{1}, Nothing, X{Colon}}}([-100, -99, -98, -97, -96, -95, -94, -93, -92, -91 … -10, -9, -8, -7, -6, -5, -4, -3, -2, -1]))
julia> axes(evil)[1] |> collect
100-element Vector{Int64}:
1
2
3
4
5
6
7
8
9
10
⋮
91
92
93
94
95
96
97
98
99
100 (cc @rafaqz - what's the best way to get the actual lookup values generically? Do we need an extension?) |
I'll have to look at the code... But if you call similar on those axes you get a Raster. (But there is no generic Base way to get axis lookup values) |
Also note this is covered in #178 I just need to find time to finish it. (and to even remember that I'm half way through working on that 😅 ) |
When I use GeometryOps.polygonize() on a raster the resulting polygons do not have the same coordinates as the input raster although the same CRS is attached to the resulting polygon. This is an example with lon/lat to show effect.
plot(ras .< 0.3) output:
poly(polygons) output:
The text was updated successfully, but these errors were encountered: