Roland,
not really an answer to your question, but note that - with a recent
gdal - you can also create kmz by using the kmlsuperoverlay output
format, e.g.:
gdal_translate -of kmlsuperoverlay <infile> out.kmz
your infile need be a rgb or rgba format (if you want to maintain
transparency, add '-co format=png' to the gdal_translate command,
otherwise jpeg's will be created for the tiles).
Regards,
Vincent.
On 02/17/2011 06:28 PM, Roland Duhaime wrote:
Thanks Brian,
I have reviewed OSGeo4W\bin\gdal2tiles.py and specifically line 1597
containing the href tag to the png file:
<Icon>
<href>%(ty)d.%(tileformat)s</href>
</Icon>
I was curious if someone had any idea on how to modify this href tag to
include the relative path as Brian suggests below. I see that the
appropriate path is already included in the name tag if the .kml is
changed to .png. Any ideas on the best approach would be appreciated.
Also, is this relative path something that should be added to the
general release to support kmz compression?
Thanks,
Roland
On Wed, Feb 16, 2011 at 5:35 PM, brian <r...@winkey.org
<mailto:r...@winkey.org>> wrote:
Roland
the problem is in /12/1211/2558.kml line 26
<href>2558.png</href>
this should be a relative path from the root of the zipfile not from
2558.kml
Brian
On Wed, 2011-02-16 at 15:14 -0500, Roland Duhaime wrote:
>
> I am following the instructions for creating one KMZ file that are
> posted here:
>
> http://trac.osgeo.org/gdal/wiki/UserDocs/Gdal2Tiles
>
> I am using gdal2tiles under the "gdal" package 1.8. I have having
> success creating superoverlays and the related folder structure.
I am
> able to read the created doc.kml in Google Earth. However, when I
> attempt to zip up the folder structure using 7zip and rename the file
> to test.kmz, the file doesn't read properly in Google Earth (GE). GE
> zooms into the correct location but all I see is a red "x".
> Compressing the superoverlay structure seems to break the link
between
> the doc.kml file and the png files. As an example, I have created a
> tiny (21 KB) example and placed it here:
>
> http://www.edc.uri.edu/Personal/roland/test.kmz
>
> I am curious if someone had some insight.
>
> All the Best,
> Roland
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org <mailto:gdal-dev@lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev