I have a directory structure containing source raster tiles (512x512 pixel png files) in TMS (XYZ) format at level 10. These have been provided to me by a third-party.
From these I'd like to generate levels 9 & 8 so additional layers can be shown in a leaflet app. I thought FME and the WebMapTiler would be the answer, but I'm struggling to get this working.
So far I have the following in workbench:
- A PNGRASTER reader that reads all the source files from the existing directory structure.
- A PythonCaller to calculate the bounding coordinates of the source tiles using a python function from here - https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames.
- A RasterGeoreferencer to georeference the rasters usign the above coordinates.
- A RasterMosaicker to generate a single raster.
- A WebMapTiler (set to GlobalCRS84Scale, Minimum Zoom=8, Maximum Zoom=10) to generate the raster tiles at level 10, 9 & 8.
- A PNGRASTER writer with the name set as the Y (row) attribute and a fanout expression of @Value(out_tile_level)\\@Value(out_tile_x) to set the directory structure as level\\X
It's almost working, but I'm having the following issues:
- The performance is very poor to generate approx 1800 tiles.
- The directories for X don't appear to be correct (e.g. the ones for level 10 aren't the same as the source)
Does anyone have any ideas or perhaps a different approach with FME to acheive this?
Regards
John