This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kml with images not loading

Tags: None
(comma "," separated)
Poivrophin
Registered Member
Posts
4
Karma
0

Kml with images not loading

Wed Mar 07, 2012 3:17 pm
Hi all,

I have a kml file with geo referenced raster images in it.
When I load it into marble, there's no bug or anything but, images described in the kml file are not loaded.

I tested the same file with google Earth, and it worked well.


Here's a sample of the kml file

Code: Select all
<Folder>
      <name>304_B</name>
      <GroundOverlay>
         <name>304_B1</name>
         <Icon>
            <href>304_B1_0.png</href>
            <viewBoundScale>0.75</viewBoundScale>
         </Icon>
         <LatLonBox>
            <north>42.8530553373404</north>
            <south>40.3213258030445</south>
            <east>4.5288959159203</east>
            <west>1.99716638162438</west>
         </LatLonBox>
      </GroundOverlay>
      <GroundOverlay>
         <name>304_B2</name>
         <Icon>
            <href>304_B2_0.png</href>
            <viewBoundScale>0.75</viewBoundScale>
         </Icon>
         <LatLonBox>
            <north>42.8530553373404</north>
            <south>40.3213258030445</south>
            <east>7.05938985747132</east>
            <west>4.5276603231754</west>
         </LatLonBox>
      </GroundOverlay>
      <GroundOverlay>
         <name>304_B3</name>
         <Icon>
            <href>304_B3_0.png</href>
            <viewBoundScale>0.75</viewBoundScale>
         </Icon>
         <LatLonBox>
            <north>42.8530553373404</north>
            <south>40.3213258030445</south>
            <east>9.58988379902234</east>
            <west>7.05815426472642</west>
         </LatLonBox>
      </GroundOverlay>
      <GroundOverlay>
         <name>304_B4</name>
         <Icon>
            <href>304_B4_0.png</href>
            <viewBoundScale>0.75</viewBoundScale>
         </Icon>
         <LatLonBox>
            <north>42.8530553373404</north>
            <south>40.3213258030445</south>
            <east>12.1203777405734</east>
            <west>9.588648206277441</west>
         </LatLonBox>
      </GroundOverlay>
   </Folder>


Doeas anyone know why my images are not loaded?

Thanks in advance
User avatar
Earthwings
KDE Developer
Posts
172
Karma
1
OS

Re: Kml with images not loading

Wed Mar 07, 2012 4:21 pm
Marble reads the .kml only partially, in particular it ignores the GroundOverlay completely as there is no handler/support implemented for that yet.

A useful way to debug this is to start marble with the --enableFileView command line parameter. It will show an additional tab 'File View' on the left where you can examine the structure of a .kml file after loading it. For your .kml you'll just get the folder named 304_B, but no subelements.
Poivrophin
Registered Member
Posts
4
Karma
0

Re: Kml with images not loading

Wed Mar 07, 2012 4:46 pm
Ok thanks a lot!


Do you know if there's any plan to take it into account in a near future?

I also would like to know if there's a way to load a custom icon for a placemark defined in a kml file?

Thanks!
User avatar
Earthwings
KDE Developer
Posts
172
Karma
1
OS

Re: Kml with images not loading

Wed Mar 07, 2012 9:47 pm
I played with it a bit, it's not too hard to implement at least for the basic stuff. Here's a screenshot of your .kml with the .pngs replaced by some marble logo:

Image

I'll commit some of the code now, but not everything. In particular we need support for different projections (currently images are painted rectangular even in Globe projection) and I need to support more tags (e.g. color, drawOrder, rotation).
Poivrophin
Registered Member
Posts
4
Karma
0

Re: Kml with images not loading

Thu Mar 08, 2012 11:41 am
Perfect, that's what I need for the moment, I work in a plane projection.

Thanks.
dcheca
Registered Member
Posts
2
Karma
0

Re: Kml with images not loading

Fri Nov 09, 2012 11:57 am
Hi Team,

I have experienced the same while I was trying to read a kml file including png links, just wondering to know if you can provide
some advise in how to read kml files including png links, it seems Earthwings did some effort and got very good results reading
kml with <GroundOverlay> clause.Appreciate so much if you can share some tips to address this.
Thanks
dcheca
Registered Member
Posts
2
Karma
0

Re: Kml with images not loading

Thu Nov 22, 2012 12:47 pm
Thanks for the feedback. As mentioned by Dennis it is already resolved on latest source code. So it is working ok.

thanks!!!


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell