Rasterize Scalar Fields

Feel free to ask any question here
Post Reply
adgreer
Posts: 5
Joined: Wed Apr 03, 2019 11:28 pm

Rasterize Scalar Fields

Post by adgreer »

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!
Attachments
Capture.PNG
Capture.PNG (49.17 KiB) Viewed 3480 times
daniel
Site Admin
Posts: 7722
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Rasterize Scalar Fields

Post by daniel »

Are you exporting it with the 'active layer' option checked?
Daniel, CloudCompare admin
adgreer
Posts: 5
Joined: Wed Apr 03, 2019 11:28 pm

Re: Rasterize Scalar Fields

Post by adgreer »

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.
daniel
Site Admin
Posts: 7722
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Rasterize Scalar Fields

Post by daniel »

When you change the active layer, do you always press the 'Update grid' button?
Daniel, CloudCompare admin
adgreer
Posts: 5
Joined: Wed Apr 03, 2019 11:28 pm

Re: Rasterize Scalar Fields

Post by adgreer »

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.
daniel
Site Admin
Posts: 7722
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Rasterize Scalar Fields

Post by daniel »

Did you manage to find a reproducible way to 'achieve' this bug? (step by step)
Daniel, CloudCompare admin
adgreer
Posts: 5
Joined: Wed Apr 03, 2019 11:28 pm

Re: Rasterize Scalar Fields

Post by adgreer »

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?
daniel
Site Admin
Posts: 7722
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Rasterize Scalar Fields

Post by daniel »

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.
Daniel, CloudCompare admin
adgreer
Posts: 5
Joined: Wed Apr 03, 2019 11:28 pm

Re: Rasterize Scalar Fields

Post by adgreer »

Ah, got it. Thanks for the help, and thanks for fixing the bug!
Post Reply