KML Placemark ID

"Mark Fenbers (NOAA Federal)" <[email protected]>
Newsgroups gmane.comp.gis.gmt.user
Message-ID <[email protected]>
Hi.

Using the KML Validator at
http://googlemapsapi.blogspot.com/2007/06/validate-your-kml-online-or-offline.html
on GMT-generated KML (via gmt2kml), I get the following warning:

In addition, interoperability with the widest range of feed
readers could be improved by implementing the following
recommendation.

-

line 31 , column 5: Placemark should contain a id
attribute. This is important if you want to link
directly to features. (285
occurrences) [help ]

<Placemark>

So I am wondering if there is already a trick/option for inserting
an "id" attribute to the placemark tag? (I definitely do want
to link directly to specific features in the KML file.) If not, how
much trouble would it be to add this capability?

In summary, I recently found 3 issues with gmt2kml-generated output:

- <Style> IDs are not unique. Fixed. Issue #509.
Checkout svn. (Thanks, Paul!)

- <Style> tags are wrapped within <Folder> tags.
Google Maps rejects KML in this format. (Apparently, Google
Earth tolerates it.)

- <Placemark> tags lack an "id" attribute. Users should
be allowed to supply their own placemark IDs, similar to how -N
provides the internal text of the <Name></Name>
tags.

I edited the gmt2kml-generated file
( http://www.erh.noaa.gov/ohrfc/HAS/images/google.kml ) so that no
<Style></Style> sections were embedded in any
<Folder></Folder> sections, and it now displays
properly (see
https://maps.google.com/maps?q=http:%2F%2Fwww.erh.noaa.gov%2Fohrfc%2FHAS%2Fimages%2Fgoogle.kml&hl=en&sll=39.334297,-84.869385&sspn=7.993517,13.721924&t=h&z=7 ).

(I did also edit the KML file to make the Style IDs unique
because I haven't yet installed the SVN version that fixes this
issue [#1 above]. I did not add <Placemark> "id"
attributes.)

Mark

To unsubscribe, send the message "signoff gmt-help" to [email protected]
mark_fenbers.vcf (text/x-vcard, 347 B)
begin:vcard
fn:Mark Fenbers
n:Fenbers;Mark
org:Ohio River Forecast Center;Hydrometeorological Analysis & Support Unit
adr:1901 South OH-134;;National Weather Service;Wilmington;OH;45177-9708;USA
email;internet:[email protected]
title:Senior Meteorologist
tel;work:937-383-0430
tel;fax:937-383-0033
url:weather.gov/ohrfc
version:2.1
end:vcard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.