[Geoserver-devel] [JIRA] (GEOS-8541) KML/KMZ Broken: export swapped east/west. import in QGIS is invalid.

Idan Miara created an issue

GeoServer / BugGEOS-8541

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

Issue Type:

BugBug

Affects Versions:

2.12-RC1, 2.11.4

Assignee:

Unassigned

Attachments:

wms.kml, wms1.kml, wms2.kml

Created:

22/Jan/18 5:40 PM

Priority:

MediumMedium

Reporter:

Idan Miara

(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.

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100076-sha1:948d923)

Atlassian logo