Skip to main content
Solved

PointCloudExpressionEvaluator producing string column


txalaparta
Contributor
Forum|alt.badge.img+3

Hello

I am trying to create a point cloud with a string column. The value of the component depends on the value of another component. I am using PointCloudExpressionEvaluatot but this doesn´t allow string components.

I could use PointCloudComponentAdder to create string components but it doesn´t work because it creates constant strings which is not what I need.

For example:

If I have the following PointCloud:

x|y|gid|col0|col1

2653000|2565400|147729036548|0|255

2654000|2565400|147729036548|0|12

 

I´d like this output

x|y|gid|col0|col1

2653000|2565400|147729036548|0|

2654000|2565400|147729036548|0|12

Replacing 255 with empty string

 

I am using FeatureReader and String concatenator but it´s very slow for about 200millionpoints

 

Any help woud be appreciated

Thanks

Oskar

 

 

 

Best answer by daveatsafe

Hi @txalaparta,

Please read the source XYZ file with col1 defined as uint8, then use a PointCloudFilter to separate the 255 points into their own cloud. The filter only accepts numeric values. You can then use a PointCloudComponentRemover on that cloud to remove the col1 component.

Send the Unfiltered cloud to a PointCloudComponentCoercer to coerce col1 to String. Send both clouds to a PointCloudCombiner to join them again. Because the 255 cloud has no col1 component, those points will have the default for String added, which is blank.

View original
Did this help you find an answer to your question?

2 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • Best Answer
  • March 29, 2019

Hi @txalaparta,

Please read the source XYZ file with col1 defined as uint8, then use a PointCloudFilter to separate the 255 points into their own cloud. The filter only accepts numeric values. You can then use a PointCloudComponentRemover on that cloud to remove the col1 component.

Send the Unfiltered cloud to a PointCloudComponentCoercer to coerce col1 to String. Send both clouds to a PointCloudCombiner to join them again. Because the 255 cloud has no col1 component, those points will have the default for String added, which is blank.


txalaparta
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • March 30, 2019
daveatsafe wrote:

Hi @txalaparta,

Please read the source XYZ file with col1 defined as uint8, then use a PointCloudFilter to separate the 255 points into their own cloud. The filter only accepts numeric values. You can then use a PointCloudComponentRemover on that cloud to remove the col1 component.

Send the Unfiltered cloud to a PointCloudComponentCoercer to coerce col1 to String. Send both clouds to a PointCloudCombiner to join them again. Because the 255 cloud has no col1 component, those points will have the default for String added, which is blank.

Yes!!! This does exactly what I wanted

 

Thanks so much


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings