Maproom / qmapshack

Consumer grade GIS software
GNU General Public License v3.0
287 stars 64 forks source link

Export view/image as KMZ? #634

Open royrwood opened 1 year ago

royrwood commented 1 year ago

Is your feature request related to a problem? Please describe.

There is no easy way that I can see to export the current map view as a KMZ file for a GPS device.

Describe the solution you'd like

Please add support to save the current map view as a KMZ file with the JPEG image and the corner coordinates. That would be really useful for creating simple custom maps for Garmin GPS devices. I know that there would be no routing info, but just the geo-located image would be great for hiking.

Describe alternatives you've considered

It is possible to save the map image and manually create the KML/KMZ, or use Google Earth, but it would be far better to do it directly from QMapShack.

Give a reason why someone else should spend time on that request

This functionality should be pretty easy to implement, since the KMZ is simple, and the result would be very useful.

Additional context

Here is a sample unpacked KMZ to illustrate what's needed:

$ tree .
.
├── doc.kml
└── files
    └── Screenshot from 2023-08-26 08-57-27.jpg

2 directories, 2 files

$ cat doc.kml 
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<GroundOverlay>
    <name>Test Overlay </name>
    <color>75ffffff</color>
    <drawOrder>50</drawOrder>
    <Icon>
        <href>files/Screenshot from 2023-08-26 08-57-27.jpg</href>
        <viewBoundScale>0.75</viewBoundScale>
    </Icon>
    <LatLonBox>
        <north>45.6817311746813</north>
        <south>45.66812061337447</south>
        <east>-76.17348724181271</east>
        <west>-76.20339365400214</west>
    </LatLonBox>
</GroundOverlay>
</kml>