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

Dims not extracting band information #462

Closed
ayushpatnaikgit opened this issue Jun 8, 2023 · 2 comments
Closed

Dims not extracting band information #462

ayushpatnaikgit opened this issue Jun 8, 2023 · 2 comments

Comments

@ayushpatnaikgit
Copy link

Hi,
I have a Raster which has 1 band.

julia> radiance_datacube                                                                                                          
84×155×123 Raster{Float32,3} unnamed with dimensions:                                                                             
  X Mapped{Float64} Float64[72.7250001018, 72.72916676850001, , 73.0666667712, 73.0708334379] ForwardOrdered Explicit Intervals c
rs: EPSG mappedcrs: EPSG,                                                                                                         
  Y Mapped{Float64} Float64[19.495832889299994, 19.491666222599996, , 18.858332884200003, 18.8541662175] ReverseOrdered Explicit 
Intervals crs: EPSG mappedcrs: EPSG,                                                                                              
  Ti Sampled{Int64} Int64[201204, 201205, , 202205, 202206] ForwardOrdered Irregular Points                                      
and reference dimensions:                                                                                                         
  Band Categorical{Int64} Int64[1] ForwardOrdered                                                                                 
extent: Extent(X = (72.72291676845, 73.07291677125001), Y = (18.85208288415, 19.497916222649994), Ti = (201204, 202206))          
crs: EPSG:4326                                                                                                                    
mappedcrs: EPSG:4326

When I try

julia> dims(radiance_datacube)
X Mapped{Float64} Float64[72.7250001018, 72.72916676850001, , 73.0666667712, 73.0708334379] ForwardOrdered Explicit Intervals crs: EPSG mappedcrs: EPSG,
Y Mapped{Float64} Float64[19.495832889299994, 19.491666222599996, , 18.858332884200003, 18.8541662175] ReverseOrdered Explicit Intervals crs: EPSG mappedcrs: EPSG,
Ti Sampled{Int64} Int64[201204, 201205, , 202205, 202206] ForwardOrdered Irregular Points

It doesn't give the Band. I believe in an earlier version, it used to give the Band information.

@rafaqz
Copy link
Owner

rafaqz commented Jun 8, 2023

Yes I dropped the single band dimension because people were complaining about it! I think that was part of the 0.7 breaking release.

You can keep it with the dropband=false keyword if you want to.

@ayushpatnaikgit
Copy link
Author

Thanks!

Lots of changes since I last looked :)

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

No branches or pull requests

2 participants