Uploaded image for project: 'GeoServer'
  1. GEOS-8541

KML/KMZ Broken: export swapped east/west. import in QGIS is invalid.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.11.4, 2.12-RC1
    • Fix Version/s: 2.13-beta
    • Component/s: None
    • Labels:
      None

      Description

      (This is a Follow up for a Geoserver-devel thread that I created. Brad & Andrea, thanks for your help)

      I'm trying to get a KMZ (KML compressed) file from Geoserver (2.12.1 or Master) and load it in QGIS (2.18.x or Master).

      The problem can be reproduced with a fresh Geoserver platform independent zip installation (Master or 2.12.1, same results) as follows:

      Layer Preview-> nurc:Img_Sample -> Select KML (compressed)
      unzip nurc-Img_Sample.kmz. you will get wms.kml (attached) and a png raster.

      Please note in this KML file:
      <east>-130.85168</east>
      <west>-62.0054</west>
      which is wrong because it should be swapped as west should be <east.

      if you open this KML/KMZ in Google Earth Pro it works just fine even tough this error.
      I guess it just assumes that west<east and just swaps it internally.

      Open this KML in QGIS (2.18.x or Master, same results) you will get a blank square instead of the raster.

      fixing wms.kml to load in QGIS:

      edit wms.kml as follows:
      Remove the following 4 lines: <Document> </Document> <Folder> </Folder>
      I'm didn't read the KML spec, but As Andrea kindly noted, this might be a QGIS limitation.
      Save as wms1.kml (attached).
      load it with QGIS, you will get the raster but horizontally swapped. I guess QGIS interperate east<west as swapped image, and doesn't assume that the values should be swapped, I'm not sure which of those error handling is 'correct'.
      I will report this issue to qgis-devel list.

      edit wms1.kml as follows:
      swap east-west
      <west>-130.85168</west>
      <east>-62.0054</east>
      Save as wms2.kml (attached).
      wms2.kml loads perfectly fine in QGIS.

      Note that all 3 files load correctly in Google Earth Pro.

        Attachments

        1. wms.kml
          2 kB
        2. wms1.kml
          2 kB
        3. wms2.kml
          2 kB

          Activity

            People

            • Assignee:
              bradh Brad Hards
              Reporter:
              idan Idan Miara
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: