Skip to main content
Solved

DataSet Fanout for FeatureWriter

  • June 23, 2017
  • 4 replies
  • 358 views

I have been using the PNGRASTER writer to do dataset fanout. But now I need to change this to a FeatureWriter, and I cannot find where on the form does one set the famout check box. The file names are comming in via a $RasterFileName attribute I created format "\\z\\x\\y.png" and the top level folder which these files should go into is $outDir (the raster files were created by running the WebMapTiler, so I don't want to lose the _num_tiles parameter, which I need to send . Thanks

I.e. I want to reproduce this sort of effect:

Best answer by takashi

Yes, you can configure dataset fanout through the Dataset field in the FeatureWriter. For example, if the destination file path consists of these elements, the setting shown in the following screenshot is possible.

  • Root folder path: a user parameter called "outDir"
  • Zoom level (z): a feature attribute called "_zoom_level" - folder name
  • Tile column index (x):  a feature attribute called "_tile_column" - subfolder name
  • Tile row index (y): a feature attribute called "_tile_row" - filename without extension

0684Q00000ArJmQQAV.png

You can enter the expression to the Dataset field using Text Editor, or directly.

$(outDir)/@Value(_zoom_level)/@Value(_tile_column)
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • June 23, 2017

Hi @ygutfreund

You'd do it in the same way that a feature type fanout is done - by selecting an attribute in the dataset parameter:


takashi
Celebrity
  • 7842 replies
  • Best Answer
  • June 24, 2017

Yes, you can configure dataset fanout through the Dataset field in the FeatureWriter. For example, if the destination file path consists of these elements, the setting shown in the following screenshot is possible.

  • Root folder path: a user parameter called "outDir"
  • Zoom level (z): a feature attribute called "_zoom_level" - folder name
  • Tile column index (x):  a feature attribute called "_tile_column" - subfolder name
  • Tile row index (y): a feature attribute called "_tile_row" - filename without extension

0684Q00000ArJmQQAV.png

You can enter the expression to the Dataset field using Text Editor, or directly.

$(outDir)/@Value(_zoom_level)/@Value(_tile_column)

anwe
Forum|alt.badge.img
  • 10 replies
  • November 20, 2018

I have a follow up question for that! Would it be possible to create zipped folder with the same folderstructe? I can do it with a normal PNG writer and fanout, but when I try with featurewriter I only get the tiles directly into the zipped folder.


takashi
Celebrity
  • 7842 replies
  • November 20, 2018

I have a follow up question for that! Would it be possible to create zipped folder with the same folderstructe? I can do it with a normal PNG writer and fanout, but when I try with featurewriter I only get the tiles directly into the zipped folder.

In the example above, you can set a zip file path to the "outDir" parameter to save the folder structure into a zip file.