Grasshopper

algorithmic modeling for Rhino

Hello,

I've been trying to find a way to do a search for entries of an excel file in a Shape file. What I'm trying to do is isolate polylines that match certain criteria. I've managed to import the data from the column in excel and isolated the corresponding field from the shape file database using Meerkat. The problem comes when I try to search one set in the other. Both sets contain numbers and text but I can't find any entries either using member index or set intersection. The only component that seems to work is Find similar member, but the problem is that not all items in the first set are in the second set, and the first set is larger than the second set. Even filtering similar indexes I can't be sure that it is actually finding only the items that are indeed in the second set. I've isolated the numbers in a file so that is easier to handle.

Views: 1431

Attachments:

Replies to This Discussion

It's important to realise you're comparing text here, not numbers. It's also important to realise that you cannot easily see whitespace characters such as spaces or tabs.

Your SIG_ID data has a single space at the end of each entry, which is messing with your comparisons. It isn't messing with similarity, which is why that worked for you.

You can use the Trim component to remove leading and trailing whitespace, or you can try and not include the spaces when exporting from Excel.

Thanks David for the quick reply. Trim solved the problem.

Yes I know I'm comparing text. But I have to, in the middle of all those numbers there are some text entries.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service