Skip to main content

Is it possible to write KMZ data in tiled format ???

I'm trying to write some raster data to a single KMZ file.

Writing the raster data to KMZ is no problem - but not in a tiled format - it doesn't seem possible ?

.........................

With Geotiff, you get an option to write:

No. of Columns per Tile 512

No. of Rows per Tile 512

..........................

Has anybody else come across this or know a solution ?

..........................

Regards

Howard L'

You may need to manually tile the raster yourself. I'm not sure how the writer would cope with multiple images coming it. Check out the WebMapTiler. Then I think you'd need to create a GroudOverlay layer?

 

https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/WKBkml/GroundOverlay.htm

 

 

I know with 3D models FME will treat each feature as a new dae model in the KMZ - maybe it does the same with raster images?

Matt,

Thanks very much for your reply.

.............

There is only 1 input image and 1 output image.

eg jpg or tif to kmz

..............................

This query is regarding compression within a single image, not a series of images like a cached map service (WebMapTiler).

..............................

High-resolution images can be accessed more efficiently — and compression tends to work better — if the image is broken into roughly square tiles.

Sometimes u see this when a screen image is refreshed and the image is drawn block by block eg in 512 x 512 blocks.

Maybe within FME - writing to KMZ like this (512 x 512) - is not possible (yet) - unlike tif and geotif

..............................

I'll dig into the WebMapTiler a bit more - but not sure if this is the route ???

..............................

Thanks once again

Regards

HJL


Matt,

Thanks very much for your reply.

.............

There is only 1 input image and 1 output image.

eg jpg or tif to kmz

..............................

This query is regarding compression within a single image, not a series of images like a cached map service (WebMapTiler).

..............................

High-resolution images can be accessed more efficiently — and compression tends to work better — if the image is broken into roughly square tiles.

Sometimes u see this when a screen image is refreshed and the image is drawn block by block eg in 512 x 512 blocks.

Maybe within FME - writing to KMZ like this (512 x 512) - is not possible (yet) - unlike tif and geotif

..............................

I'll dig into the WebMapTiler a bit more - but not sure if this is the route ???

..............................

Thanks once again

Regards

HJL

Perhaps not for sure - and I suspect you might be right about tiling when it comes to KMZ. given that kml is xml based I suspect that it would be pretty slow to figure out which tile should be loaded.

 

One thing you could do it try and write the Geotiff and just create the Document element of the KML. You might be able to just reference the GeoTiff in the kml and then zip the result together.

 

 

Alternatively you can check out the XML Templator to build your own kml document and again just write the GeoTiff and doc.kml on their own and zip it up. It wouldn't really work if you had a whole bunch of other data you wanted in the KMZ though.

Try setting the parameter Generate Super-Overlays to Yes. According to the documentation, it should automatically turn rasters into a pyramid/tile set of images.


Try setting the parameter Generate Super-Overlays to Yes. According to the documentation, it should automatically turn rasters into a pyramid/tile set of images.

Mark,

Thanks very much for your reply.

The SuperOverlays ends up creating a large file > 50 MB.

The quality is also no better than the standard FME KMZ output - its possibly slightly worse !!!

...........................

Its not so much the pyramids that I was after - which are useful for different zoom levels typically.

More the tiled data in 512 x 512 blocks (similar to Geotif) - IF at all possible.

...........................

I might have to just stick with the standard FME KMZ raster output = one large block of pixels.

The quality is certainly good - and the file size is reasonable.

...........................

Thanks once again

Regards

HJL


Reply