0

I've build an image overlay in Google Earth, but I want to add some other layers via QGIS. In QGIS 2.18.15 on Windows 10, the kmz files just open by adding a raster layer. But...they're clearly wrong. The information in the doc.kml file appears to be a bounding box and the display in QGIS looks like the aspect ratio is wrong, as if the rotation parameter was completely ignored.

So what's the magic to make this work? I have no idea where to start on this and my Google-fu trying to find an answer has failed me.

-- Additional info

I'm trying to add a couple of images, but they're not showing up...

Here is the Google Earth Overlay. Note that aspect ratio of the image.

Google Earth Overlay Google Earth Overlay

Here's what happens when I load the kml into QGIS:

QGIS KML Load QGIS KML Load

The aspect ratio is wrong, and I really expected north to still be "up".

-- Edit

The QGIS CRS is EPSG:4326. I think I tried forcing EPSG:3857 based on something I found elsewhere about Google Earth, but there is no visible different. If I add the north arrow to QGIS, it points straight up, aligned with the image. Not that the original map is an orienteering map so the north lines on it are in fact magnetic north. What I was aiming for was to pull it into QGIS after getting it calibrated via Google Earth so I could layer a UTM grid over the map.

Here's the doc.kml extracted from the KMZ file:

<?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>Untitled Image Overlay</name>
    <color>66ffffff</color>
    <Icon>
        <href>files/CCI_000001.jpg</href>
        <viewBoundScale>0.75</viewBoundScale>
    </Icon>
    <LatLonBox>
        <north>41.44234537860543</north>
        <south>41.4037612242825</south>
        <east>-73.82018638989426</east>
        <west>-73.85321641890307</west>
        <rotation>13.67718681063408</rotation>
    </LatLonBox>
</GroundOverlay>
</kml>
  • Hi Roland, welcome to GIS.SE. "clearly wrong" might be clear to you, but we don't see your screen, so could you please provide some screenshots? – Erik Nov 6 '18 at 8:08
  • Sorry, I've edited the post to show the images. The "clearly wrong" is really the aspect ratio and rotation. – Roland Roberts Nov 7 '18 at 2:17
  • The aspect ratio is probably down to the QGIS using a different projection than Google Earth. The CRS that you're using ("EPSG:nnnn", in the bottom right of the window) isn't legible in the image you uploaded. I also notice that, oddly, the north arrow on the map appears to be pointing to grid north in QGIS but not in Google Earth. As you said though, this could be QGIS not performing the rotation. – Alex Hajnal Nov 7 '18 at 2:49
  • Could you add the contents of the KML file to the question (along with a link to the map image)? – Alex Hajnal Nov 7 '18 at 2:55
  • Regarding the rotation: It looks like the map is oriented to magnetic north in Google Earth but grid north in QGIS. That strikes me as rather odd; what CRS is QGIS using? – Alex Hajnal Nov 7 '18 at 3:25
0

Something you might want to consider (now or in future) is to use the Georeferencer plugin in QGIS to do this kind of thing. You can load e.g. Google Maps into a QGIS layer using the Quick Map Services plugin1 then use the Georeferencer to, well, georeference your image against it. On occasion the plugin can be a bit finicky but over all it works very well.

A tutorial for doing this is available.

1 Using the OpenLayers plugin isn't recommended since it's prone to crashing QGIS

  • I've taken this approach and I'm almost there. It's importing as expected. I used the Google Earth overlay to find my reference points to set in the Georeferencer. Now I just need to figure out how to convert the CRS to display as UTM coordinates so I can get my printed map. – Roland Roberts Nov 9 '18 at 19:37
  • If you've set your project CRS to ESPG:32618 then your map is already using UTM coordinates (in your case 18T eeeeee nnnnnnn). To add a visible UTM grid onto your map, take a look at the 2nd and especially the 3rd option I mention in my answer here: gis.stackexchange.com/a/301781/57287 – Alex Hajnal Nov 9 '18 at 19:54
  • Well, I clearly don't know what I'm doing. Because the displayed coordinates don't look anything like the UTM format. Probably because I used the wrong units for the georeferencing. Back to square 1. – Roland Roberts Nov 9 '18 at 20:18
  • I wouldn't say that, it sounds to me like you're doing pretty well. What is the CRS that your project is currently set to (in the bottom right of the QGIS window)? If you're set to the CRS I mentioned then the coördinates shown at the bottom of the window should be UTM just without the 18T prefix. For example, the map I'm working on right now is in the Adirondacks, just a few hundred km north of the area you're mapping. I'm also using EPSG:32618 for my project and the coördinate shown on my QGIS window is 591190.8,4887674.6 which (rounded to the nearest meter) is 18T 591191 4887675. – Alex Hajnal Nov 9 '18 at 20:35
  • @RolandRoberts "don't look anything like the UTM format" Perhaps I'm misunderstanding you. Is ZZZ EEEEEE NNNNNNN not the format you're expecting for UTM? (e.g. ZZZ=18T, EEEEEE=591191, NNNNNNN=4887675 resuting in the UTM coördinate 18T 591191 4887675) – Alex Hajnal Nov 9 '18 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.