[solved] how to evaluate string attribute in delete node
3913
3
0
oat
Member
479 posts
Joined: 12月 2009
Offline
2019年12月11日 23:37
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 - 2019年12月13日 00:50:06
CYTE
Member
708 posts
Joined: 2月 2017
Offline
2019年12月12日 3:21
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
8785 posts
Joined: 7月 2007
Offline
2019年12月12日 4:06
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: 12月 2009
Offline
2019年12月13日 0:49
Thank you, tamte. Both of your suggestions work like charms. I'm glad that I learned a new trick from you.