Question

Point cloud combining

  • 11 February 2019
  • 3 replies
  • 8 views

Badge

Hi there

I have a question relating raster/point cloud. I have a zip file with a variable number of rasters.

The boundaries of each raster can be different and there could be non common cells.

I have a worksheet where I can create separate csv files with x|y|z lines.

Bit I need to create one single csv with a combination of all the rasters.

The lines for this csv must follow this schema:

 

x|y|zraster1|zrster2|....

for non common cells

x|y|z||zraster2||zraster4| etc

 

How can I do it? I´ve figured out a way with feature readers and concatenating strings but it´s painfully slow for big rasters (it takes days)

 

Any help would be appreciated

Thanks

Oskar


3 replies

Badge +2

@txalaparta can you clarify a couple of things about your data? Even better attached a small sample of the data. Attach your workspace as well if you can.

- is the CSV data a true Point Cloud or are the X/Y values unique and on a grid? i.e. are they a raster or point cloud

- about how many overlapping raster values do you expect? x|y|z||zraster2||zraster4| zrasterN. what is N?

- can you clarify the difference between 'common cells' and 'non common cells'?

Badge

Hello

 

is the CSV data a true Point Cloud or are the X/Y values unique and on a grid? i.e. are they a raster or point cloud:

- about how many overlapping raster values do you expect? x|y|z||zraster2||zraster4| zrasterN. what is N?

The input of the process is actually a zip file that wraps a number of geotiffs. How many? I can´t say in advance. N is the number of geotiffs in that zip file.

- can you clarify the difference between 'common cells' and 'non common cells'?:

Imagine that we have a DEM geotiff (single band) of Spain and a 2nd DEM with France.

Common cells are the ones of the border (Pyrenees) and Non-common cells are the cells that belong to one geotiff only.

With the transformers below I obtain two csv files, one per each Country.

I have also managed to obtain a csv file for the Pyrennes (cells that are in both geotiffs). But it´s not what I need.

I need ONE file with ALL the cells in all files (remember that there could be many in the input zip) with the following format per line

x|y|z1|z2

if there is no value in x,y in the file that z will be empty

For example let´s suppose spainDEM.tif y the 1st geotiff and franceDEM.tif is the 2nd.

x|y||325 : when x,y is in Paris

x|y|578| : when x,y is in Madrid

Thank you in advance

 

 

Userlevel 2
Badge +17

Hi @txalaparta,

I think I have a solution that uses the RasterBandCombiner to create a raster with each input as a separate band, then extracts the points from that. We have to do a little work with BoundingBoxAccumulator and RasterMosaicker to make the input raster have the same extents, and the inputs must have the same spacing.

The workspace currently assumes that the input files are Int32. If your inputs have a different interpretation, please change the NumericRasterizer to match.

tifftocsv.fmw

Reply