GPXSee icon indicating copy to clipboard operation
GPXSee copied to clipboard

Add KMZ support?

Open endolith opened this issue 3 years ago • 6 comments

kmz format is kml in a zip file

https://en.wikipedia.org/wiki/Keyhole_Markup_Language#Structure

endolith avatar Sep 23 '20 03:09 endolith

The problem with KMZ it, that it would require a dependency on QuaZIP or at least zlib. And I'm still not convinced that KMZ support is worth doing so (although there is a another place in GPXSee where zip would be nice - the DEM files which are mostly distributed compressed using ZIP).

Maybe Qt6 could bring ZIP support (there is already an internal unzip class in Qt5...).

tumic0 avatar Sep 23 '20 16:09 tumic0

And I'm still not convinced that KMZ support is worth doing so

It would add support for Garmin Custom Maps (KMZ) map format (actually KMZ with some restrictions). SAS.Planet, OCAD, OpenOrienteering Mapper and some other tools have support for Garmin KMZ map export. Also worth mentioning MapRunF, that uses maps in KMZ format. So, it would be great if GPXSee could preview such maps.

sikmir avatar Dec 22 '20 08:12 sikmir

Ok. Let's make really big changes for the 8.0 release :-). KMZ maps support is in d01a5a7e4281bc3afa6666871638e4c323ca809e. It uses the internal Qt implementation, but for Qt5 this is no more an issue as we now know that it won't change. For Qt6 we'll see...

KMZ support for data files will however have to wait until we see how the map works (it has also a much lower priority for me)

tumic0 avatar Dec 22 '20 21:12 tumic0

KMZ maps support is in d01a5a7.

I've tried to open KMZ map created by OpenOrienteering Mapper, but GPXSee terminated with:

QZip: .ZIP specification version 45 implementationis needed to extract the data.

sikmir avatar Dec 22 '20 22:12 sikmir

This means that the file uses ZIP64 format extensions which are not supported by the Qt unzip class. Some info here https://github.com/nezticle/qtcompress/issues/1

tumic0 avatar Dec 23 '20 00:12 tumic0

I have tested KMZ maps generated by QGIS, MOBAC and "self-made" maps zipped with the standar system zip command and none of them is using ZIP64 format extensions. So I think I can live with this limitation and those who can't can always repack the maps using zip (which according to the documentation uses the extensions only for files > 2GB).

tumic0 avatar Dec 23 '20 22:12 tumic0