Map behaviour

07-16-2012 02:49 PM
New Contributor III

So in this case we are determining the Asset_Height by using a control map(the white foggy hard line).
Yet we have a hard line where the buildings are flattened to the floor with an Asset_Height of 0.. now these flattened buildings are off the control map i know, however this makes no sense to me as I would have expected the height to default to the else statement and assign an Asset_Height of 100 as the map layer rule details.

attr Asset_Height =
 case map_01(brightness,0,255) > 200:
 case map_01(brightness,0,255) > 100:
 case map_01(brightness,0,255) > 60:

I find this behaviour odd, am i correct in the assessment of what is happening here?
0 Kudos
1 Reply
Frequent Contributor II
I've confirmed your find. This is indeed not so beautiful. The heuristic used here seems to just map 0 outside the map layer and evaluate the function only within the actual layer's extent.

here's a way to make it work, by defining an attr to distinguish 'inside' and 'outside'.

in the same spot, create an other attr :
attr insideMap = true

initialize it also in the rule file.

example of th the main rule :

attr insideMap = true
attr extrVal = 50

Lot -->
 case insideMap :
  extrude(100) # default value 

don't forget to point the attr sources to the layer.

that way, you can distinguish between the 2 states and still map the full range of values, including zero from black areas of the map.

let me know if it works too in your case.
0 Kudos