[solved] how to evaluate string attribute in delete node

   3355   3   0
User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
The geometry has an attribute “id” which contains string values for each polygon.

How shall I refer to it in the “filter by expression” option in the delete node?

I tried the following, and they didn't seem to work:

@id = "Building A"
`@id` = "Building A"
@id == "Building A"
`@id` == "Building A"
Edited by oat - Dec. 13, 2019 00:50:06
User Avatar
Member
679 posts
Joined: Feb. 2017
Offline
Hey Oat,

one way is using a partition node and convert your id string to groups by typing id into the rule field. After that you can delete by group in the delete node.
But I guess there are other ways.

Cheers
CYTE
User Avatar
Member
8539 posts
Joined: July 2007
Offline
in Delete SOP expression you may need to use this
strcmp(@id,"Building A")==0

however you can use Blast SOP instead and in Group parameter type:
@id="Building A"
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
Thank you, tamte. Both of your suggestions work like charms.

I'm glad that I learned a new trick from you.
  • Quick Links