Save doc.kml as MyFileName.kmz?

5 views
Skip to first unread message

terrypin

unread,
Jun 10, 2007, 4:09:13 AM6/10/07
to gpicsync
I'm no KML expert, but from experiments it seems that I can re-save
the doc.kml (with an appropriate unique name of my own) as a KMZ file
instead of KML. It then contains the photos. So I can then delete the
photos in the folder, yes?

Oddly, it also seems that I can save a copy as KML, and after deleting
the photos (from the folder in which the doc.kml was created), they
will still work OK in GE.

Could you perhaps spell out the basic rules about the photo fle
locations please, as I am not 100% clear about all this. I am keen to
avoid duplicates of photos.

--
Terry, West Sussex, UK

francois schnell

unread,
Jun 10, 2007, 7:58:58 AM6/10/07
to gpic...@googlegroups.com
On 6/10/07, terrypin <terr...@dial.pipex.com> wrote:
>
> I'm no KML expert, but from experiments it seems that I can re-save
> the doc.kml (with an appropriate unique name of my own) as a KMZ file
> instead of KML. It then contains the photos. So I can then delete the
> photos in the folder, yes?

If you save as KMZ in GE, GE will create a ZIP file with your kml and
a folder called "files" with a copy of your pictures in it. Of course
GE renames the ZIP extension to KMZ and makes the necessary changes in
the saved kml (like liking to files/yourpicture1.jpg,...)

If you right clik on a KMZ file you can probably explore the archive
with your compression software (I use 7-zip).

>
> Oddly, it also seems that I can save a copy as KML, and after deleting
> the photos (from the folder in which the doc.kml was created), they
> will still work OK in GE.

I've just tried this but then I can't see the photo anymore when I
click on the icons

Are you sure it wasn't a doc-web.kml and that you already published
the photos on the web maybe? (otherwise I don't know)


>
> Could you perhaps spell out the basic rules about the photo fle
> locations please, as I am not 100% clear about all this. I am keen to
> avoid duplicates of photos.
>

Nothing special (the kml for GE directly links to the picture in the
folder and the kml for GM links to the URL).
You can see that by right clicking an icon in GE and select
properties or open the kml in a text editor (kml is a simple markup
language a little like html).You can even select a kml in GE then
ctrl-c and open a text editor then ctrl-v

francois

Message has been deleted
Message has been deleted

terrypin

unread,
Jun 10, 2007, 11:41:25 AM6/10/07
to gpicsync

On Jun 10, 12:58 pm, "francois schnell" <francois.schn...@gmail.com>
wrote:


> On 6/10/07, terrypin <terry...@dial.pipex.com> wrote:
>
>
>
> > I'm no KML expert, but from experiments it seems that I can re-save
> > the doc.kml (with an appropriate unique name of my own) as a KMZ file
> > instead of KML. It then contains the photos. So I can then delete the
> > photos in the folder, yes?
>
> If you save as KMZ in GE, GE will create a ZIP file with your kml and
> a folder called "files" with a copy of your pictures in it. Of course
> GE renames the ZIP extension to KMZ and makes the necessary changes in
> the saved kml (like liking to files/yourpicture1.jpg,...)
>
> If you right clik on a KMZ file you can probably explore the archive
> with your compression software (I use 7-zip).
>
>
>
> > Oddly, it also seems that I can save a copy as KML, and after deleting
> > the photos (from the folder in which the doc.kml was created), they
> > will still work OK in GE.
>
> I've just tried this but then I can't see the photo anymore when I
> click on the icons

These are the steps I took in this experiment:

1) Folder gpicsync-test containes the photos, the original GPX, and
the created doc.kml. That kml file uses references like <img
src='20050814-091543.jpg'

2) Open doc.kml in GE and save it as doc-UsingFiles-SaveAsKMZ.kmz

3) Open doc-UsingFiles-SaveAsKMZ.kmz in GE. Works OK.

4) Delete photo files from folder. (Actually I stored them in a
subfolder, Temp.)

5) doc-UsingFiles-SaveAsKMZ.kmz still works OK, as you'd expect.

6) Save it as doc-UsingFiles-SaveAsKMZ.kml

7) Open doc-UsingFiles-SaveAsKMZ.kml. This still works OK, i.e.
pictures are still displayed properly. That kml file uses references
like <img src='doc-UsingFiles-SaveAsKMZ.kmz/files/
20050814-091543.jpg. So I thought that explained why it still works,
i.e. the presence of the KMZ file. But...

8) Delete doc-UsingFiles-SaveAsKMZ.kmz

9) Re-open doc-UsingFiles-SaveAsKMZ.kml in GE. It *still* works, which
is what puzzles me. How can GE find the photo, from <img src='doc-
UsingFiles-SaveAsKMZ.kmz/files/20050814-091543.jpg, if doc-
UsingFiles-
SaveAsKMZ.kmz no longer exists in the folder?

francois...@gmail.com

unread,
Jun 10, 2007, 4:13:49 PM6/10/07
to gpicsync

On Jun 10, 5:41 pm, terrypin <terry...@dial.pipex.com> wrote:

>
> These are the steps I took in this experiment:
>
> 1) Folder gpicsync-test containes the photos, the original GPX, and
> the created doc.kml. That kml file uses references like <img
> src='20050814-091543.jpg'
>
> 2) Open doc.kml in GE and save it as doc-UsingFiles-SaveAsKMZ.kmz
>
> 3) Open doc-UsingFiles-SaveAsKMZ.kmz in GE. Works OK.
>
> 4) Delete photo files from folder. (Actually I stored them in a
> subfolder, Temp.)
>

Strange, the pictures you've just geocoded should be at the same level
as your kml.

For the rest I don't know (there is no binary where informations could
be hidden everything is in plain text in the KML)

I wounder if you have the kml (or kmz) already in your "My
places" (not the temporary folder). So when you load your kml (or kmz)
and click on it you actualy don't see this one but the one which is in
"My places".

Other than that I don't really have other ideas (I'm not GE expert
either).

francois

Reply all
Reply to author
Forward
0 new messages