KML,KMZ file not readable

64 views
Skip to first unread message

Thomas Hooge

unread,
Jan 23, 2011, 7:16:29 AM1/23/11
to KML Developer Support - Advanced Support for KML
Hello all,

i use GE 6.0.1.2032.
i saved a kml, kmz file but cannot read this again.
After some experiments i found out that i put it on a local folder
which has a "#" sign in the beginning of the pathname.
If i put the same file in an other folder it is working correctly.
I think there are some restrictions for valid letters in a pathname.

regards
Thomas
Message has been deleted

Jason M

unread,
Jan 24, 2011, 9:43:01 AM1/24/11
to KML Developer Support - Advanced Support for KML
'#' is special character in URLs marking the anchor reference (e.g.
http://server/file#anchor). Likewise if you save file locally with
name "places#1.kml" then it isn't loaded by GE running in Windows XP.

In fact I tried this test. Save one placemark (A) in one file named
'test.kml' and another (B) in another file 'test.kml#1.kml' both in
same directory. If you load file 'test.kml#1.kml' then test.kml with
placemark A is loaded.

Looks like '#' and text following is being stripped from file path.

If same file is served from web server and accessed with URL escaped
(# -> %23) (e.g. http://server/kml/test.kml%231.kml) then GE still
fails to load the file.

Apparently Google Earth is not escaping the file names completely.
There was a problem recently with whitespace in folders or filenames
not being loaded.

This is a bug in GE, however, to use GE correctly this puts a limit on
what GE accepts in paths and filenames for KML/KMZ content.

Windows for example does not allow the following characters in file
names: \ (backslash), / (forward slash), : (colon), * (asterisk), ?
(question mark), " (double quotes), < (left angle bracket), > (right
angle bracket), | (pipe).

It is best practice to avoid %, #, and $ characters in file or path
names as these are commonly used as variable name prefixes, so it can
get messy if automating anything with filenames that include these
characters. If networking cross platform (e.g. Samba, SMB, CIFS)
consider effects of !+{}&[] on path and filename translation.

Reported this issue as a bug:
http://code.google.com/p/earth-issues/issues/detail?id=1126

--jason
Reply all
Reply to author
Forward
0 new messages