Skip to main content

I have a large raster mosaic that I wish to clip into smaller DOQQ-sized rasters. A significant percentage of the tiles will be mostly "no data" (0,0,0) areas that I don't need. I currently use the PointCloudCombiner and PointCloudStatistics to calculate statistics for each tile and drop those where the median of each of the 3 bands is zero (0). My question is, does the Point Interval parameter of the PointCloudCombiner function as a sampler? Can I set the value from 1.0 to 10.0 thereby sampling every tenth cell? If it works that way, I can calculate each tile's statistics faster and save time.

This doesn't exactly answer the original question, but may suit your needs better.

 

 

If you set the NoData value of the raster to 0 prior to using the PointCloudCombiner, the resultant point cloud feature will have the number of points:0 if the tile is entirely no data.

 

 

The easiest way I've found to get the number of points in a point cloud is to use the PointCloudPropertyExtractor, remove all but one of the components, and make sure none of the check boxes are checked. That way no time is spent calculating any statistics, but an attribute called _num_points is added to the feature.


Unfortunately, your answer does not suit my needs @jdh. The reason I put "no data" in quotes is that the "no data" values are in fact zero (0), therefore there is no need to set them to zero (0). More importantly, the tiles I want to remove are not entirely composed of zeroes. That's why I need to calculate statistics and hence my question, Can PointCloudCombiner's Point Interval param be used as a sampler for large raster mosaic?


As far as I know the Point Interval applies only to vector features. To reduce the point cloud you can use the PointCloudThinner


Unfortunately, your answer does not suit my needs @jdh. The reason I put "no data" in quotes is that the "no data" values are in fact zero (0), therefore there is no need to set them to zero (0). More importantly, the tiles I want to remove are not entirely composed of zeroes. That's why I need to calculate statistics and hence my question, Can PointCloudCombiner's Point Interval param be used as a sampler for large raster mosaic?

The previous logic applies, but instead of testing for _num_points = 0, you could test for _num_points < 0.5*rows*cols.

 

 

Note that you are not setting the no data cell values to 0, you are setting the raster band to have a NoData value of 0 so that all cells with a 0 value are not converted to the point cloud at all.

 

 


As far as I know the Point Interval applies only to vector features. To reduce the point cloud you can use the PointCloudThinner

Yep, that works @jdh. I was able to reduce the size of each dataset by selecting an interval of 10 and got the same results (i.e. - correct output). Unfortunately, it doesn't save time. Apparently, thinning the point cloud uses any time I would save not having to calculate statistics on the entire point cloud. On a test raster, the workspace took 12:36 with thinning and 12:24 without so it's basically a wash.

 


Reply