Question

4 x 9 = 16 ???


Userlevel 1
Badge +22

Hi group,

I've run into a curious problem with the Tiler transformer.

I'm trying to sub-divide tiles, but when I sub-divide a previously sub-divided tile, it doesn't divide up the way it's supposed to.

My simple example divided an initial box into 3x3, and then I attempt to sub-divide each of these 9 features into 2x2. I expected 36 tiles, but I end up with 16 boxes !?!

What gives??

Cheers

 

Lars I.

 


12 replies

Userlevel 1
Badge +10

I see the same behaviour, using a 2dGridAccumulator I get 36 tiles

Userlevel 1
Badge +22

Thanks all.

I would expect the Tiler to work on whatever geometry is given to it, not the whole dataset. So I will still call it a bug. How else can I sub-divide some tiles but not others ?

The 2DGridAccumulator does indeed give me 36 tiles, but only when using grouping, which again assumes an "all dataset" approach, which I can't use.

Any other ideas on how to selectively sub-divide a single tile (that's an output from an already performed tiling) ?

Please don't tell me that I have to build my own custom transformer for this !?!

Cheers

 

Lars I.

Badge +16

Thanks all.

I would expect the Tiler to work on whatever geometry is given to it, not the whole dataset. So I will still call it a bug. How else can I sub-divide some tiles but not others ?

The 2DGridAccumulator does indeed give me 36 tiles, but only when using grouping, which again assumes an "all dataset" approach, which I can't use.

Any other ideas on how to selectively sub-divide a single tile (that's an output from an already performed tiling) ?

Please don't tell me that I have to build my own custom transformer for this !?!

Cheers

 

Lars I.

Hi @lifalin2016, well if you want to use the tiler, you will probably need to create one, although its an overkill...the one I was showing contains only one transformer (tiler) using it in an custom transformer makes it possible to use a group by on the _row and _column created by the first transformer.

 

Creating a parameter in the custom transformer, makes it possible:

 

https://knowledge.safe.com/questions/34862/group-by-in-rubbersheeter.html

 

Userlevel 1
Badge +22

Thanks all.

I would expect the Tiler to work on whatever geometry is given to it, not the whole dataset. So I will still call it a bug. How else can I sub-divide some tiles but not others ?

The 2DGridAccumulator does indeed give me 36 tiles, but only when using grouping, which again assumes an "all dataset" approach, which I can't use.

Any other ideas on how to selectively sub-divide a single tile (that's an output from an already performed tiling) ?

Please don't tell me that I have to build my own custom transformer for this !?!

Cheers

 

Lars I.

Hi @itay

 

I'm actually employing a loop-back (in a Workbench custom transformer), so I may be sub-dividing a single tile in multiple iterations based on a test. So the all-dataset+grouping will definitely not work for me.

 

It would actually be much simpler, if the existing "Tiler" transformer was enhanced with a "divide individually" checkbox, that would enable single geometry sub-divisioning.

 

I've become quite proficient in making transformers in Python, but it is kinda overkill, as you write.

 

Cheers,

 

Lars I.

 

Userlevel 2
Badge +17

It's not so difficult to create a workflow which can divide a rectangular polygon into N x M tiles. e.g.

You can also create a custom transformer containing this workflow and Loop to iterate the dividing process, if necessary.

Userlevel 1
Badge +22

Hi all.

I found a simpler way using the 2DGridAccumulator.

I needed the transformer to divide the individual tile separately, using the "group by" functionality. It occurred to me that a dynamically applied random value would do the trick, and so added an attribute "tile_uuid" with the value "@UUID()" to every tile being sub-divided just before running it thru 2DGridAccumulator.

This worked, and I'm now seing successive sub-divisions where applicable.

So thanks @egomm (sorry about the first confusion, itay) for the suggestion to apply the 2DGridAccumulator instead of Tiler.

Cheers

 

Lars I.

Userlevel 2
Badge +17

Hi all.

I found a simpler way using the 2DGridAccumulator.

I needed the transformer to divide the individual tile separately, using the "group by" functionality. It occurred to me that a dynamically applied random value would do the trick, and so added an attribute "tile_uuid" with the value "@UUID()" to every tile being sub-divided just before running it thru 2DGridAccumulator.

This worked, and I'm now seing successive sub-divisions where applicable.

So thanks @egomm (sorry about the first confusion, itay) for the suggestion to apply the 2DGridAccumulator instead of Tiler.

Cheers

 

Lars I.

If all you need was just to differentiate individual features uniquely, the sequential number attribute that can be generated by the Counter could also be available.

 

Userlevel 4
Badge +25

Just to chime in, yes, the Tiler tiles up all of the data that enters it. What the real "bug" here is that the Tiler doesn't have a group-by parameter. If it had that then it would be simple enough to do what you need.

I will file an enhancement request to suggest we add that [Filed as PR#72941]

So - as you have noted - the 2DGridAccumulator is a fix here. In fact the way I solved this was a Tiler (3x3) and then a 2DGridAccumulator (2x2) using the Tiler _column and _row attributes to group by. That way you don't need to create any ID numbers.

Badge

Another option

Badge +3

@lifalin2016

There has been a long standing trick to do this.

Create a custom Tiler.

Make parameters out of the nr of rows and columns attributes.

Set the the custom to paralelprocessing, parallel proces by row and column.

(set paralellel proces to minimal)

Use this rather thne normal tiler.

Badge +3

lol...mathew was faster

Userlevel 4
Badge +25
Just wanted to announce to everyone that PR#72941 has been completed in FME2017, build 17170. That means the Tiler now has a group-by option. In this case the second Tiler would have a group-by set that used the row/column attributes of the first. For other users, you'll no longer need to create a custom Tiler transformer to carry out a group by.

 

Reply