4

Still learning my way around QGIS and ran into an odd issue this evening. I'm using a program called Radio Mobile Deluxe to generate RF models. It exports images as KML ground overlays. I then bring the KML into QGIS, then georeference the raster.

However, this evening, I noticed that things didn't look quite right. I should be looking at perfectly square objects (8000x8000 meters and a 800x800 pixel raster).

The overlay imports perfectly into Earth, but when I bring it into QGIS, it's measuring out 10km wide. However, when I compare visual features in the imagery basemap and roads, everything looks dead on. I'm really not sure what I'm looking at here, if it's a problem, or how to fix it.

I'm using QGIS 2.18.4, the project CRS is 4326. Not quite sure what other information I should provide.

Here's a screenshot, showing a very square object in Earth and a not-so-square object in QGIS, along with the N/S/E/W coordinates generated by Radio Mobile.

enter image description here

Here's a sample KML file I created in Earth and loaded into QGIS:

<?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">
<Document>
    <name>foo.kml</name>
    <Style id="s_ylw-pushpin_hl">
        <IconStyle>
            <scale>1.3</scale>
            <Icon>
                <href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
            </Icon>
            <hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
        </IconStyle>
        <LineStyle>
            <color>ff0000ff</color>
            <width>3.5</width>
        </LineStyle>
        <PolyStyle>
            <fill>0</fill>
        </PolyStyle>
    </Style>
    <StyleMap id="m_ylw-pushpin">
        <Pair>
            <key>normal</key>
            <styleUrl>#s_ylw-pushpin</styleUrl>
        </Pair>
        <Pair>
            <key>highlight</key>
            <styleUrl>#s_ylw-pushpin_hl</styleUrl>
        </Pair>
    </StyleMap>
    <Style id="s_ylw-pushpin">
        <IconStyle>
            <scale>1.1</scale>
            <Icon>
                <href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
            </Icon>
            <hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
        </IconStyle>
        <LineStyle>
            <color>ff0000ff</color>
            <width>3.5</width>
        </LineStyle>
        <PolyStyle>
            <fill>0</fill>
        </PolyStyle>
    </Style>
    <Placemark>
        <name>Untitled Polygon</name>
        <styleUrl>#m_ylw-pushpin</styleUrl>
        <Polygon>
            <tessellate>1</tessellate>
            <outerBoundaryIs>
                <LinearRing>
                    <coordinates>
                        -79.22887,38.08849,0 -79.13737,38.08849,0 -79.13737,38.08849,0 -79.13737,38.16048,0 -79.22887,38.16048,0 -79.22887,38.16048,0 -79.22887,38.16048,0 -79.22887,38.08849,0 
                    </coordinates>
                </LinearRing>
            </outerBoundaryIs>
        </Polygon>
    </Placemark>
</Document>
</kml>

EDIT: Here's what the raster looks like (after converting to polygon and removing the background).

enter image description here

When I spot-check the overlay down to the pixel, it's identical between QGIS and Earth. Accurate enough for modeling RF signals, which tend to get pretty fuzzy in the real world.

  • What is the layer CRS set to? Could be a georeferencing error? Sometimes when I come across something weird like that I georeference the image again and double check the numbers I type in. Usually that fixes the issue. – Joe Apr 7 '17 at 4:56
  • I had to restart my project several times before settling on EPSG: 4326, which for good or bad, I find easiest to work with at this time. – Troy Apr 7 '17 at 11:25
  • While 4326 seemed to work well, it looks like I'll have to use 3857 for my project (at least until I find something better). – Troy Apr 7 '17 at 15:35
3

It seems like you're having the expected behaviour.

Google Earth does not distort your image while QGIS is ! Due to it's 3D Globe, Google Earth can be equal of angle AND area (disclaimer: unless you have a 3d screen, projection onto your 2d screen will of course distort your angle too, but that is not noticeable on that scale).

As coordinates on the globe are always 3D, QGIS needs to project them somehow onto the map on your 2D screen. Thus, the image will always be distorted. The projection commonly used for showing WGS84 (EPSG:4326) coordinates is Plate Carree (longitude=x, latitude=y). If you're looking on the whole Globe using this projection, the further you go north or south the more distorted it will be.

enter image description here

(Picture: Eric Gaba – Wikimedia Commons)

This is why a lot of CRS exist, most of them suitable only for one specific region of the earth where it shows only very little distortion.

What you can do:

Change the projection of your map in QGIS to the UTM Zone of your region (or maybe play around using Mercator (EPSG:3857) and you will have your almost perfect square.

EPSG:3857


EPSG:4326

  • Thank you so much for that. At first, I was discounting the difference as a combination of illusion and projection differences. For some reason, this particular object really stood out to me. The part I really don't understand is why 8km in Earth is 10km in QGIS. I tested on 16 and 32km, which measured out to 20 and 40km respectively. – Troy Apr 7 '17 at 12:27

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.