Hi Brad & Andrea

Thanks for your kind replys.
I can reproduce the problem 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 becuse it should be swapped as west should be <east.

As Brad kindly noted, 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 handlings
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.


Kind regards,
Idan




On 22 January 2018 at 02:21, <[email protected]> wrote:

> Hi Idan,
>
>
>
> Just to follow up on Andrea’s suggestions, I did some testing with a
> current GeoServer (master) build and
>
> Google Earth EC 7.3.0.3832 (32-bit) with some rasters from the standard
> release (nurc:ImgSample and nurc:Pk50095). They looked fine – definitely
> no reversed images, so its unlikely to be a general problem.
>
>
>
> I did try downloading the KML but my QGIS 2.18.15 didn’t recognise it as a
> raster layer, and drag and drop resulted in empty attribute tables.
>
>
>
> Brad
>
>
>
> *From:* Andrea Aime [mailto:[email protected]]
> *Sent:* Monday, 22 January 2018 5:13 AM
> *To:* Idan Miara <[email protected]>
> *Cc:* Geoserver-devel <[email protected]>
> *Subject:* Re: [Geoserver-devel] KML/KMZ support broken?
>
>
>
> Hi Idan,
>
> are you sure there is a bug in GeoServer and not a limitation in QGIS
> instead?
>
> The second issue you report is definitely a problem in QGIS, a KML
> document can have whatever structure it wants, nesting
>
> documents, layers and features as desired, see:
>
> https://developers.google.com/kml/documentation/kmlreference
>
>
>
> The issue with order of coordinates is also strange, as KML mandates a
> specific order (lon/lat) and we never received
>
> a complaint about it. It could be related to your particular TIFF?
>
> Try to reproduce with a demo TIFF layer and let's see how that works (I
> wanted to have a look myself but I have no time).
>
>
>
> Final note, unless you're interested in changing the GeoServer code
> yourself, this is the wrong list, your question
>
> seems more like a GeoServer users list (asking there you'd also have a 4
> times larger audience).
>
>
>
> Cheers
>
> Andrea
>
>
>
>
>
> On Wed, Jan 17, 2018 at 2:34 PM, Idan Miara <[email protected]> wrote:
>
> Hi,
>
> I'm trying to get a KMZ (KML compressed) file from Geoserver (2.12.1) and
> load it in QGIS (2.18.14).
>
> The input raster is a RGB Tiff.
>
> CRS: WGS84 Lat/Lon
>
> The output KMZ that I get via the Layer preview is broken.
> I could fix it and load it successfully in QGIS in the following way if I
> edit the inner KML:
>
> 1. swap east and west (in the original kml east<west) -
> seems like an obvious bug.
>
> 2. Remove the following 4 lines: <Document> </Document> <Folder> </Folder>
>
> I'm not sure why this helps, but it does.
>
> If necessary, I would generate and attach a small Tiff to reproduce this
> issue (otherwise I would assume it can be reproduced with any Tiff).
>
> Kind Regards,
>
> Idan.
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>
>
>
>
> --
>
> Regards,
>
> Andrea Aime
>
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/it488V for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
> 55054
> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>  Massarosa
> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
> (LU)
> phone: +39 0584 962313 <+39%200584%20962313>
> fax: +39 0584 1660272 <+39%200584%20166%200272>
> mob: +39  339 8844549 <+39%20339%20884%204549>
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>
> Le informazioni contenute in questo messaggio di posta elettronica e/o
> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
> darcene notizia via e-mail e di procedere alla distruzione del messaggio
> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
> principi dettati dal D.Lgs. 196/2003.
>
> The information in this message and/or attachments, is intended solely for
> the attention and use of the named addressee(s) and may be confidential or
> proprietary in nature or covered by the provisions of privacy act
> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
> Code).Any use not in accord with its purpose, any disclosure, reproduction,
> copying, distribution, or either dissemination, either whole or partial, is
> strictly forbidden except previous formal approval of the named
> addressee(s). If you are not the intended recipient, please contact
> immediately the sender by telephone, fax or e-mail and delete the
> information in this message that has been received in error. The sender
> does not give any warranty or accept liability as the content, accuracy or
> completeness of sent messages and accepts no responsibility  for changes
> made after they were sent or for other risks which arise as a result of
> e-mail transmission, viruses, etc.
>
>
>

Attachment: wms2.kml
Description: application/vnd.google-earth.kml

Attachment: wms1.kml
Description: application/vnd.google-earth.kml

Attachment: wms.kml
Description: application/vnd.google-earth.kml

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to