MapInfo Pro

 View Only
  • 1.  How can I insert null values in a Viewshed

    Posted 04-06-2018 11:13
      |   view attached

    When creating a viewshed, there is an option to insert null values in all cells outside the viewshed. But how can I insert null values in all the blue cells where the object is not visible from. The viewshed covers the background map. I can set the layer transparency to 50% to see the background map, but it would be even better if I could replace all the blue parts of the viewshed with null values to make these 100% transparent, and the rest 50% transparent. Would be cool with a checkbox "Null value in cells where point(s) is not visible" in the viewshed options.

    Can I run some tool/command to insert null values in all the blue cells?



  • 2.  RE: How can I insert null values in a Viewshed

    Employee
    Posted 04-08-2018 20:26

    Hi Hans,

    There is a feature in RASTER > Raster Operations > Calculator > which can be used to reassign values to grid per specific conditions. I was looking at using the 'Replace with variable' expression syntax, and struggled a bit to get it to recognize using 'null' to replace all '0' values. It looks like it is not accepting null (string) as a variable.

     

    Mitchell Holliday one of our subject matter experts kindly suggested to use the following syntax:

    cond(Input_1 = 0, null, Input_1)

     

    I've tested this and was able to assign null to all cells with '0' values successfully.

    Hope this helps!

    Dave

     



  • 3.  RE: How can I insert null values in a Viewshed

    Posted 04-09-2018 04:51

    This works, thanks. Only thing is the red values turn out blue. I found another way. If I double click the style to the left of the layer name in the Map (explorer tab) I get the "Adjust Image Styles". In here, I can select a transparency color and click the blue color in the raster image, to make it transparent.