Skip to main content
Solved

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


jpdenboer
Contributor
Forum|alt.badge.img+2

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?

Best answer by takashi

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.

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

5 replies

Forum|alt.badge.img+7

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.


takashi
Evangelist
  • Best Answer
  • March 17, 2017

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.


Forum|alt.badge.img+7
takashi wrote:

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 :)

 

 


takashi wrote:

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?

mark2atsafe
Safer
Forum|alt.badge.img+49

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.


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