[solved] how to evaluate string attribute in delete node
3882
3
0
oat
Member
479 posts
Joined: Dec. 2009
Offline
Dec. 11, 2019 11:37 p.m.
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
CYTE
Member
708 posts
Joined: Feb. 2017
Offline
Dec. 12, 2019 3:21 a.m.
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
tamte
Member
8780 posts
Joined: July 2007
Offline
Dec. 12, 2019 4:06 a.m.
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:
Tomas Slancik FX Supervisor Method Studios, NY
oat
Member
479 posts
Joined: Dec. 2009
Offline
Dec. 13, 2019 12:49 a.m.
Thank you, tamte. Both of your suggestions work like charms. I'm glad that I learned a new trick from you.