Hello,
I have calculated several different geometric parameters as scalar fields, and I wish to export each of them as a raster. Using the rasterize tool, I have been selecting a geometric field calculated through CC (i.e. anisotropy) as my scalar field, and am able to see the results in the adjacent window. However, when I export the active layer and open it in ArcMap/QGIS, the result is simply a raster populated with 0's. I am following the same procedure for a height raster and am getting the desired values when I open it elsewhere, so I am unsure what I am doing wrong. I have attached an image of my input. Is there any solution to this issue?
Thank you!
Rasterize Scalar Fields
Rasterize Scalar Fields
- Attachments
-
- Capture.PNG (49.17 KiB) Viewed 3428 times
Re: Rasterize Scalar Fields
Are you exporting it with the 'active layer' option checked?
Daniel, CloudCompare admin
Re: Rasterize Scalar Fields
Whoops, I sent you the wrong screenshot :) I have been checking 'Export active layer,' my output just ends up being empty. When I click 'Export heights,' I get an acceptable height raster.
Since I made this post, I actually have been able to successfully export the active layer a couple of times. I have noticed that sometimes, when I open up the Raster Export Options window, "Export all scalar fields" is not an option (see the window in my previous screenshot). However, sometimes it is an option. When it is available as an option, I get my desired results when I check 'export active layer', but when it isn't, I get an empty output.
I have absolutely no idea why this occurs, or why it is sometimes available and sometimes not.
Since I made this post, I actually have been able to successfully export the active layer a couple of times. I have noticed that sometimes, when I open up the Raster Export Options window, "Export all scalar fields" is not an option (see the window in my previous screenshot). However, sometimes it is an option. When it is available as an option, I get my desired results when I check 'export active layer', but when it isn't, I get an empty output.
I have absolutely no idea why this occurs, or why it is sometimes available and sometimes not.
Re: Rasterize Scalar Fields
When you change the active layer, do you always press the 'Update grid' button?
Daniel, CloudCompare admin
Re: Rasterize Scalar Fields
I don't always have the option to click "Update Grid" when I am simply switching between scalar fields or other active layers. I typically have the option when I first open the Rasterize tool, or if I change the step size, and am prevented from opening "Raster Export Options" box until I have updated the grid. But, say I change my step size so that I can update the grid, and then try to export a raster of a scalar field - I still don't get the desired results.
Re: Rasterize Scalar Fields
Did you manage to find a reproducible way to 'achieve' this bug? (step by step)
Daniel, CloudCompare admin
Re: Rasterize Scalar Fields
So, after messing around with it, I believe I can consistently export a scalar value raster if I:
1) Open Rasterize Tool
2) Select desired step size, keep active layer as 'height grid values'
3) Update Grid
4) Select desired active layer
5) Open Raster export options & select "Export Active layer"
If, during step 2, I change the active layer to a scalar field and then proceed to step 3, I get an empty output. Now that I've figured out a way to get the desired results, I'm happy with the above workflow. But I do wonder if there is some reason why I can't select a scalar field from the beginning, before I update the grid?
1) Open Rasterize Tool
2) Select desired step size, keep active layer as 'height grid values'
3) Update Grid
4) Select desired active layer
5) Open Raster export options & select "Export Active layer"
If, during step 2, I change the active layer to a scalar field and then proceed to step 3, I get an empty output. Now that I've figured out a way to get the desired results, I'm happy with the above workflow. But I do wonder if there is some reason why I can't select a scalar field from the beginning, before I update the grid?
Re: Rasterize Scalar Fields
Ok, this was definitely a bug. The 'interpolate SF(s)' check-box was automatically disabled when a SF was selected as 'layer' (so as to 'force' the user to select a projection strategy). But the fact that it was disabled was considered as a reason for not computing the scalar field!
That's fixed in the latest 2.11.alpha release available online.
That's fixed in the latest 2.11.alpha release available online.
Daniel, CloudCompare admin
Re: Rasterize Scalar Fields
Ah, got it. Thanks for the help, and thanks for fixing the bug!