Thanks for your support!

I've opened a ticket :
https://osgeo-org.atlassian.net/browse/GEOS-8541


On 22 January 2018 at 13:20, Andrea Aime <[email protected]>
wrote:

> Ouch, yep, that is definitely a bug that needs fixing, thanks Brad!
>
> Cheers
> Andrea
>
> On Mon, Jan 22, 2018 at 12:04 PM, <[email protected]> wrote:
>
>> If you need a quick fix for the swapped coordinates, this might help:
>>
>> diff --git 
>> a/src/kml/src/main/java/org/geoserver/kml/sequence/PlainFolderSequenceFactory.java
>> b/src/kml/src/main/java/org/geoserver/kml/sequence/PlainFold
>> erSequenceFactory.java
>>
>> index c32e3280e..4a973aac5 100644
>>
>> --- a/src/kml/src/main/java/org/geoserver/kml/sequence/PlainFold
>> erSequenceFactory.java
>>
>> +++ b/src/kml/src/main/java/org/geoserver/kml/sequence/PlainFold
>> erSequenceFactory.java
>>
>> @@ -113,8 +113,8 @@ public class PlainFolderSequenceFactory extends
>> AbstractFolderSequenceFactory {
>>
>>              }
>>
>>              LatLonBox gobox = go.createAndSetLatLonBox();
>>
>> -            gobox.setEast(box.getMinX());
>>
>> -            gobox.setWest(box.getMaxX());
>>
>> +            gobox.setEast(box.getMaxX());
>>
>> +            gobox.setWest(box.getMinX());
>>
>>              gobox.setNorth(box.getMaxY());
>>
>>              gobox.setSouth(box.getMinY());
>>
>>          }
>>
>>
>>
>> (I’ll make the tests and turn that into a PR at some point after the
>> ticket gets created).
>>
>>
>> Brad
>>
>>
>>
>> *From:* [email protected] [mailto:[email protected]]
>> *Sent:* Monday, 22 January 2018 9:59 PM
>> *To:* 'Idan Miara' <[email protected]>
>> *Cc:* 'Geoserver-devel' <[email protected]>; 'Andrea
>> Aime' <[email protected]>
>>
>> *Subject:* Re: [Geoserver-devel] KML/KMZ support broken?
>>
>>
>>
>> I would agree that the LatLonBox values appear to be swapped in the
>> GroundOverlay. This will occur in KML compressed or plain, but maybe not in
>> network link. Can you please file a Jira ticket for that?
>>
>>
>>
>> The Document/Folder structure is almost certainly valid, and lack of
>> handling is a bug in QGIS (or some supporting library).
>>
>>
>>
>> Brad
>>
>>
>>
>> *From:* Idan Miara [mailto:[email protected] <[email protected]>]
>> *Sent:* Monday, 22 January 2018 9:36 PM
>> *To:* [email protected]
>> *Cc:* Andrea Aime <[email protected]>; Geoserver-devel <
>> [email protected]>
>> *Subject:* Re: [Geoserver-devel] KML/KMZ support broken?
>>
>>
>>
>> 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.
>>
>>
>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%3Chttps://maps.google.com/?q%3DVia%2Bdi%2BMontramito%2B3/A%2B55054%2B%25C2%25A0Massarosa%26entry%3Dgmail%26source%3Dg%3E%C2%A0Massarosa+%3Chttps://maps.google.com/?q%3DVia%2Bdi%2BMontramito%2B3/A%2B55054%2B%25C2%25A0Massarosa%26entry%3Dgmail%26source%3Dg%3E&entry=gmail&source=g>
>>
>>
>>
>
>
>
> --
>
> 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+%3Chttps://maps.google.com/?q%3DVia%2Bdi%2BMontramito%2B3/A%2B55054%2B%25C2%25A0Massarosa%26entry%3Dgmail%26source%3Dg%3E%C2%A0Massarosa+%3Chttps://maps.google.com/?q%3DVia%2Bdi%2BMontramito%2B3/A%2B55054%2B%25C2%25A0Massarosa%26entry%3Dgmail%26source%3Dg%3E&entry=gmail&source=g>
> 55054
> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%3Chttps://maps.google.com/?q%3DVia%2Bdi%2BMontramito%2B3/A%2B55054%2B%25C2%25A0Massarosa%26entry%3Dgmail%26source%3Dg%3E%C2%A0Massarosa+%3Chttps://maps.google.com/?q%3DVia%2Bdi%2BMontramito%2B3/A%2B55054%2B%25C2%25A0Massarosa%26entry%3Dgmail%26source%3Dg%3E&entry=gmail&source=g>
>  Massarosa
> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%3Chttps://maps.google.com/?q%3DVia%2Bdi%2BMontramito%2B3/A%2B55054%2B%25C2%25A0Massarosa%26entry%3Dgmail%26source%3Dg%3E%C2%A0Massarosa+%3Chttps://maps.google.com/?q%3DVia%2Bdi%2BMontramito%2B3/A%2B55054%2B%25C2%25A0Massarosa%26entry%3Dgmail%26source%3Dg%3E&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.
>
>
------------------------------------------------------------------------------
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