[Marble-devel] Reading kml files with png files included. is it supported?

Anders Lund anders at alweb.dk
Thu Nov 8 08:58:08 UTC 2012


On Torsdag den 8. november 2012 09:13:37 Dennis Nienhüser wrote:
> Hi Dario,
> 
> this (GroundOverlay with images) is supposed to work, assuming the .png
> images are located in the same folder as the .kml you are loading.
> Prerequisites are using latest stable version (1.4) or git master, and
> not using spherical projection.
> Note that the current implementation does a naive mapping of pixels to
> geopositions, introducing errors (read: it will look fine, but don't
> trust the pixel <-> geoposition mapping especially towards the image
> center). I plan to fix that, at which point spherical projection will
> work as well.

If you click a link to a .kml file in a webbrowser in KDE, it should ask you 
if you want to open with marble. When confirmed, KDE will download the file to 
/tmp and open it with marble.

By then, the relative hrefs in the icon tag will not be correct, they should 
be calculated relative to the file URL by marble.

Same if you download any kml file and open it with marble. IIRC, back when I 
was experimenting with skipperguide, marble didn't support downloading remote 
images at all, even if I rewrote the file to contain a fully qualified URL it 
was not attempted, iirc the code used qfile.

Regards,
Anders

> Regards,
> Dennis
> 
> Am 07.11.2012 16:28, schrieb Dario Checa:
> > Reading kml files with png files included. is it supported?
> > 
> > Hello team,
> > 
> > I am trying to load a kml file on marble widget, I can do when I used
> > a basic kml file but when I am trying to do the same but using a kml
> > file including png files It seems it is not supported. I was digging
> > out the web to find if this is supported or not but no findings.
> > So just wondering to know if you can tell me if this is supported or not.
> > 
> > This is an example of kml file that I am trying to use:
> > 
> > Appreciate your comments.
> > Thanks in advance
> > -Dario
> > 
> > <?xml version="1.0" encoding="UTF-8"?>
> > <kml xmlns="http://www.opengis.net/kml/2.2"
> > xmlns:gx="http://www.google.com/kml/ext/2.2"
> > xmlns:kml="http://www.opengis.net/kml/2.2"
> > xmlns:atom="http://www.w3.org/2005/Atom">
> > <Folder>
> > 
> >   <name>Radar data at station Zirbitzkogel     (coding type: PLC)</name>
> >   <description>Radar reflectivity at date: 19691231 23:59:59
> > 
> > UTC</description>
> > 
> >   <GroundOverlay>
> >   
> >     <name>Reflectivity at elevation 0 (0.15 degree)</name>
> >     <description>Reflectivity at elevation 0 (0.15 degree)</description>
> >     <Icon>
> >     
> >       <href>dario-0-elev-0.15.png</href>
> >     
> >     </Icon>
> >     <LatLonBox>
> >     
> >       <north>49.0867</north>
> >       <south>45.057</south>
> >       <east>17.5086</east>
> >       <west>11.613</west>
> >     
> >     </LatLonBox>
> >   
> >   </GroundOverlay>
> >   <GroundOverlay>
> >   
> >     <name>Reflectivity at elevation 1 (0.73 degree)</name>
> >     <description>Reflectivity at elevation 1 (0.73 degree)</description>
> >     <Icon>
> >     
> >       <href>dario-1-elev-0.73.png</href>
> >     
> >     </Icon>
> >     <LatLonBox>
> >     
> >       <north>49.0867</north>
> >       <south>45.057</south>
> >       <east>17.5086</east>
> >       <west>11.613</west>
> >     
> >     </LatLonBox>
> >   
> >   </GroundOverlay>
> >   <GroundOverlay>
> >   
> >     <name>Reflectivity at elevation 2 (1.63 degree)</name>
> >     <description>Reflectivity at elevation 2 (1.63 degree)</description>
> >     <Icon>
> >     
> >       <href>dario-2-elev-1.63.png</href>
> >     
> >     </Icon>
> >     <LatLonBox>
> >     
> >       <north>49.0867</north>
> >       <south>45.057</south>
> >       <east>17.5086</east>
> >       <west>11.613</west>
> >     
> >     </LatLonBox>
> >   
> >   </GroundOverlay>
> >   <GroundOverlay>
> >   
> >     <name>Reflectivity at elevation 3 (2.72 degree)</name>
> >     <description>Reflectivity at elevation 3 (2.72 degree)</description>
> >     <Icon>
> >     
> >       <href>dario-3-elev-2.72.png</href>
> >     
> >     </Icon>
> >     <LatLonBox>
> >     
> >       <north>49.0867</north>
> >       <south>45.057</south>
> >       <east>17.5086</east>
> >       <west>11.613</west>
> >     
> >     </LatLonBox>
> >   
> >   </GroundOverlay>
> > 
> > </Folder>
> > </kml>
> > 
> > 
> > 
> > _______________________________________________
> > Marble-devel mailing list
> > Marble-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/marble-devel
-- 
Anders


More information about the Marble-devel mailing list