GeoServer

Adding Legend breaks KML Output for Google Earth

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6.0
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    Windows XP, Tomcat 6.0.10, Google Earth 4.2.0198.2451 (beta)
  • Testcase included:
    yes
  • Number of attachments :
    5

Description

Adding a legend of true to a KML file causes Google Earth to report an error.
I used the KML Output option for topp:states and saved it (If I just opened it then it worked fine).
I then modified it and replaced the legend=false with legend=true and then opened it from My Computer. google Earth then opened and reported an error when processing the KML file.
I am attaching a screendump of the error as well as the KML file that I used.
I noticed that a similar bug report had been raised at http://jira.codehaus.org/browse/GEOS-1595 but marked as closed as it could not be reproduced.
I have gone from 1.5.0 to 1.6.0 and so am unsure as to whether it would have been in previous versions. Based on the closed bug report I will download 1.5.3 and try that out.
My Geoserver.war is dated 11/02/2008 and I am unsure which release of 1.6.0 that it represents.
I'm happy to help with testing or if you need more information to reproduce the problem.

  1. geoserver.log
    20/Oct/08 6:37 AM
    26 kB
    Brendan Moylan
  2. states.kml
    20/May/08 4:34 AM
    1 kB
    Brendan Moylan
  3. states.kml
    04/Mar/08 6:08 AM
    1 kB
    Brendan Moylan
  1. Google_Earth_error.jpg
    340 kB
    20/May/08 4:34 AM
  2. GoogleEarth_Error.jpg
    38 kB
    04/Mar/08 6:08 AM

Activity

Hide
Brendan Moylan added a comment -

I upgraded to 1.6.1. The issue was still present.

However when I did not use KML Reflect and used the full text like this

http://127.0.0.1:9090/geoserver//wms?service=WMS&request=GetMap&format=application/vnd.google-earth.kml+XML&width=1024&height=1024&srs=EPSG:4326&layers=topp:act_suburb_polygon&styles=act_suburb_bir_2003&legend=true&bbox=-180,-90,180,90

then it worked. So my guess is the problem is specific to KML Reflect.

Show
Brendan Moylan added a comment - I upgraded to 1.6.1. The issue was still present. However when I did not use KML Reflect and used the full text like this http://127.0.0.1:9090/geoserver//wms?service=WMS&request=GetMap&format=application/vnd.google-earth.kml+XML&width=1024&height=1024&srs=EPSG:4326&layers=topp:act_suburb_polygon&styles=act_suburb_bir_2003&legend=true&bbox=-180,-90,180,90 then it worked. So my guess is the problem is specific to KML Reflect.
Hide
Gabriel Roldán added a comment -

Hi Brendan,
I've been trying to reproduce for a good while without success.
There's something I don't quite understand though:
Your sample request uses the layer topp:act_suburb_polygon, but the screenshot says it can't load topp:states

So I'm wondering if the error popup actually means you have an old link saved in GE whilst when running with your new config the topp:states layer no longer exists?

If its not that I would need more specific instructions on how to reproduce. For instance, could you provide a dataset and a style you're using and is causing problems. A shapefile + sld would be just fine. If you can't send that in public feel free to send a little shapefile by email directly to me.

I'll wait for a while to hear from you, then I'll have to close this issue as can't reproduce.

Cheers,

Gabriel

Show
Gabriel Roldán added a comment - Hi Brendan, I've been trying to reproduce for a good while without success. There's something I don't quite understand though: Your sample request uses the layer topp:act_suburb_polygon, but the screenshot says it can't load topp:states So I'm wondering if the error popup actually means you have an old link saved in GE whilst when running with your new config the topp:states layer no longer exists? If its not that I would need more specific instructions on how to reproduce. For instance, could you provide a dataset and a style you're using and is causing problems. A shapefile + sld would be just fine. If you can't send that in public feel free to send a little shapefile by email directly to me. I'll wait for a while to hear from you, then I'll have to close this issue as can't reproduce. Cheers, Gabriel
Hide
Brendan Moylan added a comment -

Files from followup email to Gabriel from new install of version 1.6.2

Show
Brendan Moylan added a comment - Files from followup email to Gabriel from new install of version 1.6.2
Hide
Brendan Moylan added a comment -

Gabriel,
I tried emailing but they are bouncing as it says you are over quota. I've attached files from my new install showing the error and here is the text of the email as to how I reproduced it.

Brendan

Gabriel,

Thanks for letting me know you are working on it. I've just run up a new
machine and have reinstalled 1.6.2 and still have the problem. My sequence
of steps is

Open Geoserver
Go to the demo page and select KML for topp:states (I picked this as it
comes with it).
I initially Open the file and let it go straight to Google Earth but this
does not give the legend
I then close Google Earth and don't save the Temp Places info
Then go back to Geoserver and select KML again
Save the resultant file rather than open it.
Edit the file (Ultraedit prompts to change it to Dos Format) and change the
legend=False to legend=True
Double click on the KML file from My Computer to open it in google earth
When in Google Earth zoom in towards the USA.
The error I have captured as an attachment below then occurs.

The last two steps seem to be a new quirk since I upgraded to this machine
and the new versions. Interestingly when I first opened the kml file
directly from geoserver rather than saving it I did not see the geoserver
data until I zoomed in. Again the legend bug did not occur until I zoomed.

I'm attaching the new KML file and a screendump. The legend did show up
initially but not the data.

I'm happy to run any repeat tests that will help you with this.

Brendan

Show
Brendan Moylan added a comment - Gabriel, I tried emailing but they are bouncing as it says you are over quota. I've attached files from my new install showing the error and here is the text of the email as to how I reproduced it. Brendan Gabriel, Thanks for letting me know you are working on it. I've just run up a new machine and have reinstalled 1.6.2 and still have the problem. My sequence of steps is Open Geoserver Go to the demo page and select KML for topp:states (I picked this as it comes with it). I initially Open the file and let it go straight to Google Earth but this does not give the legend I then close Google Earth and don't save the Temp Places info Then go back to Geoserver and select KML again Save the resultant file rather than open it. Edit the file (Ultraedit prompts to change it to Dos Format) and change the legend=False to legend=True Double click on the KML file from My Computer to open it in google earth When in Google Earth zoom in towards the USA. The error I have captured as an attachment below then occurs. The last two steps seem to be a new quirk since I upgraded to this machine and the new versions. Interestingly when I first opened the kml file directly from geoserver rather than saving it I did not see the geoserver data until I zoomed in. Again the legend bug did not occur until I zoomed. I'm attaching the new KML file and a screendump. The legend did show up initially but not the data. I'm happy to run any repeat tests that will help you with this. Brendan
Hide
Gabriel Roldán added a comment -

Hi Brendam,

I've tried with the states.kml file you attached and a gesoerver 1.6.4 running on localhost and couldn't reproduce. I seem to be able to zoom in and the legend still works.
The really useful thing you could do is provide us with a stack trace from the geoserver log, if any.
Also, please try with 1.6.4.

cheers,
Gabriel

Show
Gabriel Roldán added a comment - Hi Brendam, I've tried with the states.kml file you attached and a gesoerver 1.6.4 running on localhost and couldn't reproduce. I seem to be able to zoom in and the legend still works. The really useful thing you could do is provide us with a stack trace from the geoserver log, if any. Also, please try with 1.6.4. cheers, Gabriel
Hide
Brendan Moylan added a comment -

Geoserver log from 1.6.2 as requested by Gabriel on 15 Sep. Emails to jira are still bouncing with out of quota error. I have downloaded 1.6.5 and will install it soon and repeat the test.

Brendan

Show
Brendan Moylan added a comment - Geoserver log from 1.6.2 as requested by Gabriel on 15 Sep. Emails to jira are still bouncing with out of quota error. I have downloaded 1.6.5 and will install it soon and repeat the test. Brendan
Hide
Andrea Aime added a comment -

This one has been waited for feedback from the user for a long time. Shall we just close it as "cannot reproduce"?

Show
Andrea Aime added a comment - This one has been waited for feedback from the user for a long time. Shall we just close it as "cannot reproduce"?
Hide
Damian Bradley added a comment - - edited

I have always had this problem, the legend never functioned correctly with 1.7.6 , evident on my public facing server:

http://www.decartoconsulting.com:8080/geoserver/wms/kml?layers=topp:states&legend=false

vs

http://www.decartoconsulting.com:8080/geoserver/wms/kml?layers=topp:states&legend=true

I can dig into my logs as well if you want to pursue.

*Edit: Note zooming in on a portion of the data so it returns less than about a dozen records/states will enable it to function

Show
Damian Bradley added a comment - - edited I have always had this problem, the legend never functioned correctly with 1.7.6 , evident on my public facing server: http://www.decartoconsulting.com:8080/geoserver/wms/kml?layers=topp:states&legend=false vs http://www.decartoconsulting.com:8080/geoserver/wms/kml?layers=topp:states&legend=true I can dig into my logs as well if you want to pursue. *Edit: Note zooming in on a portion of the data so it returns less than about a dozen records/states will enable it to function
Hide
Andrea Aime added a comment -

Is it still happening on 2.0.x series? (1.7.x is unsupported)

Show
Andrea Aime added a comment - Is it still happening on 2.0.x series? (1.7.x is unsupported)
Hide
Andrea Aime added a comment -

No fetching errors using http://demo.opengeo.org/geoserver/wms/kml?layers=topp:states&legend=true (which is a 2.0.x nightly, more or less one month old). I assume it has been fixed in the meantime

Show
Andrea Aime added a comment - No fetching errors using http://demo.opengeo.org/geoserver/wms/kml?layers=topp:states&legend=true (which is a 2.0.x nightly, more or less one month old). I assume it has been fixed in the meantime

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: