Skip to main content
Solved

How to filter point cloud based on dynamic attribute values?

  • November 6, 2017
  • 4 replies
  • 56 views

Forum|alt.badge.img+1

I tried looking for similar queries but I need some help with this asap. To explain my question further, I have a point cloud with x, y, z and the fourth column is a componentID (after having done connected components) I have a text file which consists of a string of component ID values.

I am trying to filter the point cloud based on the number of component ID values in my text file. So, I have a couple of questions.

1. I am trying the basic method by filtering the point cloud based on the value of the component but I keep getting the following error

PointCloudFilter(PointCloudEvaluationFactory): Attribute 'C1' is specified in an expression but is not present on the feature. Please ensure the feature has all referenced attributes

I am not really sure how to solve this. Because if I use an attribute creator to assign values to C1 independent of the values from text file, it works fine. But when I integrate it with text file it goes into error.

2. My text file will not always contain 3 values. It will vary. How do I make my workflow such that my point cloud is filtered dynamically according to the number of values in my text file.

I guess this is too specific hence I have attached a template file. I have been struggling with this the last 2 days and really appreciate some help!

Thank you

Best answer by daveatsafe

Hi @sraapril,

In order to put the text file attributes onto the point cloud, you must explicitly merge the features using a FeatureMerge transformer. I am attaching a modified workspace illustrating how to use this transformer with an indiscriminate merge.

pointmatch2.fmw

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 1637 replies
  • Best Answer
  • November 7, 2017

Hi @sraapril,

In order to put the text file attributes onto the point cloud, you must explicitly merge the features using a FeatureMerge transformer. I am attaching a modified workspace illustrating how to use this transformer with an indiscriminate merge.

pointmatch2.fmw


Forum|alt.badge.img+1
  • Author
  • 37 replies
  • November 7, 2017

Hi @DaveAtSafe

Thank you very much! This works exactly like I want it to for my question 1.

Is there a workaround for question 2? I need to filter my point cloud based on all the values from the incoming list. However it is dynamic. Is there a way to code for the expression in point cloud filter?

Sravanthi


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 1637 replies
  • November 7, 2017

Hi @sraapril,

For question 2, we can do this if we modify the text file into a proper CSV file, with columns for the point_source_id and matching classification.

I created a new CSV file in a text editor, in the form:

point_source_id,classification23450,622685,723949,8

I then changed the workspace to use a PointCloudSplitter and ListSearcher to apply the classification from the CSV.

Please try the attached workspace.

pointmatch3.fmw

las-py.csv


Forum|alt.badge.img+1
  • Author
  • 37 replies
  • November 7, 2017

Hi @sraapril,

For question 2, we can do this if we modify the text file into a proper CSV file, with columns for the point_source_id and matching classification.

I created a new CSV file in a text editor, in the form:

point_source_id,classification23450,622685,723949,8

I then changed the workspace to use a PointCloudSplitter and ListSearcher to apply the classification from the CSV.

Please try the attached workspace.

pointmatch3.fmw

las-py.csv

@DaveAtSafe 

 

 

You are incredible! I was working on making my having a text file in the format you just have used. Now you built the workflow further. WOW! 

 

 

Thank you very much! :D