Skip to main content

I have a WMTS that works fine in QGIS, but which I can not get to work in FME Desktop (2021.2 and 2022.1). I start the WMTS-reader, use the following address:

 

https://tiles1.geoserve.eu/Mosaics/tieserver/20220531_20220416_SV_RD_8bit_RGBMosaic_50cm_Nederland/wmts

 

and than I get this error:

 

.tmp' exists but could not be opened. File contents may be invalid, or the file format may not be supported

Worker 1780 > Failed to obtain any schemas from reader 'WMTS' from 1 datasets. This may be due to invalid datasets or format accessibility issues due to licensing, dependencies, or module loading. See logfile for more information

 

 

Parameter settings are chosen from the layer itself:

format: Image/png

Tilematrix: Gooflemapscompatible

Tile resolution: 18

 

I did try other resolutions.

 

Again: It works fine in Qgis

From the url you provided I can tell that the getCapabilities is wrongly advertising it supplies png, when it actualy supplies jpeg rasters.

<Format>image/jpgpng</Format> is the definition on line 64.

QGIS has a diferent method of reading rasters, FME needs to know in advanced what the raster format is. As it's trying to read png from jpeg it gets stuck.

I suggest a workaround:

Use WebMapTiler to create some GoogleMapsCompatible tiles for your zoom level (it requires a raster as input, just put your area of input polygon or bbox through NumericRasterizer), send the tiles to HTTPCaller set to GET https://tiles1.geoserve.eu/Mosaics/tieserver/20220531_20220416_SV_RD_8bit_RGBMosaic_50cm_Nederland/@Value(_zoom_level)/@Value(_tile_column)/@Value(_tile_row) - the url needed for WMTS that uses the default output attributes of WebMapTiler, send the output to a BoundsExtractor to get x/y min/max needed to georeference the downloaded rasters, to RasterReplacer set as JPEG and Blob atribute set as _responce_body, and finaly send this to a RasterGeoreferencer set as Extents with the necesary attributes from BoundsExtractor.

WMTS workaroundSee also attached workspace.


From the url you provided I can tell that the getCapabilities is wrongly advertising it supplies png, when it actualy supplies jpeg rasters.

<Format>image/jpgpng</Format> is the definition on line 64.

QGIS has a diferent method of reading rasters, FME needs to know in advanced what the raster format is. As it's trying to read png from jpeg it gets stuck.

I suggest a workaround:

Use WebMapTiler to create some GoogleMapsCompatible tiles for your zoom level (it requires a raster as input, just put your area of input polygon or bbox through NumericRasterizer), send the tiles to HTTPCaller set to GET https://tiles1.geoserve.eu/Mosaics/tieserver/20220531_20220416_SV_RD_8bit_RGBMosaic_50cm_Nederland/@Value(_zoom_level)/@Value(_tile_column)/@Value(_tile_row) - the url needed for WMTS that uses the default output attributes of WebMapTiler, send the output to a BoundsExtractor to get x/y min/max needed to georeference the downloaded rasters, to RasterReplacer set as JPEG and Blob atribute set as _responce_body, and finaly send this to a RasterGeoreferencer set as Extents with the necesary attributes from BoundsExtractor.

WMTS workaroundSee also attached workspace.

That is incredibly insightful and very, very helpful, thank you so much!!


Hello @michiedem​ , thanks for posting! @caracadrian​'s workaround looks good! The image/jpgpng shouldn't be an issue, FME should be able to work with this as of FMEENGINE-73560. I think that means it gets both JPG and PNG so it should be able to read whatever comes from the server.

 

I think the error your seeing is thrown by the reader when it recieves no image at a tile. If you were to copy & inspect the path to the .tmp in the error message, I think you'd see something like this:

 

image 

I have filed this as FMEENGINE-74041, I'll update the thread as I can. You should still be able to run and cache the data at lower resolutions with these errors present in the logfile, mind you it doesn't seem like this service has a ton of images at lower resolutions. If you're trying to read from super high resolutions, like 18, I'd consider using a bounding box in Tile Selection to reduce the amount of tiles you're grabbing, which should ultimately reduce the number of errors you see. Hopefully this is clearer, Kailin.


Reply