Solved

How can I create a common ID where y-coordinate is the same

  • 17 March 2017
  • 5 replies
  • 0 views

Badge +1

I want to use the rastermosaicker with parallel processing. Because the process takes days. So I want a common ID where the Y-coordinate is the same. (see ). What is the best way to solve this problem?

icon

Best answer by takashi 17 March 2017, 11:38

View original

5 replies

Badge

Hi @famjpdenboer

I think you can use the following combination of transformers to retrieve the x-coordinate:

- chopper (nb vertices = 1)

 

- CoordinateExtractor (y-coordinate)

 

- Statisticscalculator (f.e. minimum x-value per tile)

Now you will have for every tile 1 Y coordinate (the minimum of the tile) which can be used to group your tiles.

Userlevel 2
Badge +17

Hi @famjpdenboer, you can use the BoundsExtractor or the RasterPropertyExtractor to extract extents (xmin, ymin, xmax, ymax) for each raster. Then, group the rasters by ymin or ymax. If there could be a tolerance among the y values, consider rounding them.

Badge

Hi @famjpdenboer, you can use the BoundsExtractor or the RasterPropertyExtractor to extract extents (xmin, ymin, xmax, ymax) for each raster. Then, group the rasters by ymin or ymax. If there could be a tolerance among the y values, consider rounding them.

Same idea but a nicer implementation. That is a thumbs up :)

 

 

Hi @famjpdenboer, you can use the BoundsExtractor or the RasterPropertyExtractor to extract extents (xmin, ymin, xmax, ymax) for each raster. Then, group the rasters by ymin or ymax. If there could be a tolerance among the y values, consider rounding them.

Thanks for the answer @takashi , a couple follow up questions:

 

 

a. does this process output a single raster or one raster per group?

 

 

b. if it produces one raster per group, when creating massive mosaics would it make sense to use this workflow internally (e.g. 100tiles grouped and mosaicked into 5 groups of 20 tiles each, then mosaicking those 5 groups)

 

 

c. i'm having a bit of trouble adding the By Group functionality once the BoundsExtractor is complete. How do you view the added attributes of xmin, ymin, xmax, ymax to determine how to round/group them?
Userlevel 4
Badge +25

For the record, our development team are investigating the parallel processing mode on the RasterMosaicker. We aren't convinced that it will actually produce results faster. For example (a+b)+(c+d) using parallel processing for a+b and c+d, might actually be slower than just doing a+b+c+d in the first place.

I'll let you what the result of the investigation is. If it's not good, we may remove the parallel processing option from this transformer.

Reply