[Qgis-user] Import of kml file containing an image

SCHULZ Wolfgang W.Schulz at ove.at
Thu Jul 3 00:23:10 PDT 2014


Hello,
thanks a lot - this was exactly what I needed.
Wolfgang

> -----Ursprüngliche Nachricht-----
> Von: Richard Duivenvoorde [mailto:rdmailings at duif.net]
> Gesendet: Mittwoch, 02. Juli 2014 21:54
> An: SCHULZ Wolfgang; qgis-user at lists.osgeo.org
> Betreff: Re: [Qgis-user] Import of kml file containing an image
> 
> On 02-07-14 13:53, SCHULZ Wolfgang wrote:
> > Hello!
> >
> > I would like to import the attached kml file which includes the
> > attached gif file into QGIS but always get an error. There is no
> > problem in Google Earth.
> >
> > Any workaround for this?
> >
> > Thanks for your help.
> 
> Hi Wolfgang,
> 
> as Andre tells you: the info is in the kml file and the gif itself.
> 
> for QGIS to load your gif, it needs a so called world file (google worldfile), for
> gif with the extention .gfw
> 
> IF your image is not rotated (yours seems to have no rotation), you can create a
> worldfile yourself (or use a tool, see below):
> 
> for your image something like this should work (also attached)
> 
> 0.07213114754098361
> 
> 0
> 
> 0
> 
> -0.08043478260869565
> 
> -11.0
> 
> 72.0
> 
> Line 1: A: pixel size in the x-direction in map units/pixel Line 2: D: rotation
> about y-axis Line 3: B: rotation about x-axis Line 4: E: pixel size in the y-
> direction in map units, almost always negative Line 5: C: x-coordinate of the
> center of the upper left pixel Line 6: F: y-coordinate of the center of the upper
> left pixel
> 
> to come to the values above:
> 
> - the image is 610 pixels wide, and 460 pixels high
> 
> - either open the kml file in an editor, or open it with QGIS, you find this values
> for the extent:
> north 72
> south 35
> east 33
> west -11
> 
> first line becomes 44degrees/610=07213114754098361 second 0 third 0 fourth
> 37degrees/460=0.08043478260869565 (with a minus in front) fifth = west sixth
> = north
> 
> with this file you can load your gif file into QGIS (given you gave the worldfile
> the same name+.gfw).
> 
> More info:
> http://en.wikipedia.org/wiki/World_file
> http://dominoc925.blogspot.nl/2012/01/google-gadget-for-creating-esri-
> world.html
> http://giswiki.hsr.ch/WorldFileTool
> 
> for simple kml files it should be easy to write a little plugin or processing
> algorithm to do this...
> 
> Regards,
> 
> Richard Duivenvoorde
> 
> 




More information about the Qgis-user mailing list