ravenab

Selection via map issue

Discussion created by ravenab on Jan 18, 2012
Latest reply on Jan 23, 2012 by ravenab
Hi,

I'm trying to get the Select by map layer function to work, but got stuck. I have the following function map layer:

class = getObjectAttr("StreetType")
 
attr streetWidth =
 case class == "highway":
  17.5
 case class == "city":
  9 
 case class == "oneway":
  4.5
 else:
  9
   
  
attr isCity = class == "city"


The streetWidth is set as expected, but the selection does not work. The selection appears in the selection menu, but does not select anything (even though I have many segments marked as "city"). Changing the last row to some dummy code like the following does work:
attr isCity = 1 < 10


Does it have anything to do with the StreetType attribute itself? Not all objects have the attribute, just the segments. Thankful for any advice!

/Magnus

Outcomes