Batch Converting GeoTIFF to KML/MKZ vs Export Raster Format
idtweedie
Global Mapper User
I am currently convering a large number of Geotiff maps to KML/KMZ. If I use a single map sheet with the batch export command in GM14, the KMZ that is created is significantly larger than the single raster export using the Export Raster Image Format method and the same map sheet. For both exports I am using png image format, and creating super overlays. Why is the file size of the resultant KMZ larger with the batch export than with exporting the same map sheet using the Export Raster/Image Format method? Any comments or suggestions?
Comments
-
I wonder if you can rename your .kmz to .zip and then open it up and provide me with a PNG from each? I wonder if maybe the batch converted KMZ is being created as 24-bit PNG and the other as a palette.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com -
Having trouble attaching the png's. The dimensions on the batch conversion for L0 is 816x102 pixels where as the dimensions on the single sheet export are 566x412 pixels for L0. I also noticed that the batch png's are tiled up to L7 whereas the single export is tiled up to L5. This would account for the increased file size in the kmz. The question is why the tiles are stretched horizontally and why is it adding two layers of tiles?
-
When we export the batch kmz with a pallete instead of 24bit png, it does reduce the file size slightly however the quality of the png decreases. The png's in the batch export are 3-5x larger file size than the same tile in the single export.
Another question, is there a way to specify how many levels are created when exporting to GE? How does it chose the number of levels when exporting to kmz? What is it based on? -
I took a look and found the issue. The batch conversion was using a different method to compute how large in pixels to make the KMZ when reprojecting and it was over-estimating in this case. I have corrected it to use the same method as the normal export so now you should get about the same results assuming you don't check the option to force square pixels. I have placed a new build at http://www.globalmapper.com/global_mapper14.zip with the change for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.globalmapper.com/global_mapper14_64bit.zip .
The number of levels is based on getting everything into a single tile of the super overlay tile size. So because the export pixel size was larger than it should be there were more levels added. The new build should give you the same behavior since the pixel dimensions would be the same.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com -
We installed the new build and it reduced the file size significantly, however the individual png's in the batch conversion are still larger (4x the size) than with the export raster to kmz (at 1024x1024). We are wondering if the difference is the bit depth between the two methods. The batch exports at 24bit png's. Does the export raster to kmz export at 8bit png?
Thanks for the quick responses -
We looked at both png's in photoshop, the batch is exporting to a 8bit RGB png whereas the export raster to kmz is exporting to a 8bit index colourspace. Could this explain the increase in the png file size?
-
When you selected the format to put in the KMZ in the batch conversion did you choose PNG with an 8-bit palette? There are separate format options on the batch conversion dialog, one for 24-bit RGB and the other for 8-bit palette PNGs.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com -
We tried to export the batch earlier as 8bit palette and the quality was horrible. But we tried it again after your modifications and the quality is as good as the direct export and around the same file size. It looks like our problem has been solved, thanks for the excellent support.
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 627 GM Script Language
- 52 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website