Drawing circles and stars on Google Earth with KML

11 Sep 2007

So I'm sure you were wondering what the last post was about. Here are the fruits of my labor.

I created a new googlecode project kmlcircle that will generate the appropriate Google Earth KML snippet for circles, regular polygons and stars. Check out the examples:



Comment 2009-04-02 by None

Hi Nick,

I've been using your KML Circle code. It's awesome.

I'd like to contribute back to your project... I have the following to add:

* Translated to VB.NET
* Arcs
* An incomplete move from a spherical Earth model towards WGS84

Comment 2009-04-02 by None

hi there... send me an email to nickg ---at----
client9 DOT com

and I can make you a 'project owner' and then you can hack away!

Comment 2009-06-19 by None


Thanks for the code and i agree with frankv. It is awesome. It has given me good insight into Python and KML, however, i have hit a snag when i try to plot near the poles. I suspect you have knowledge of this.
Plot 5 equi-distant circles between lat 0 degs to lat 90 degs(-90 degs) with radius of 500000 meters.

The plots near the equator are fine but as you near the poles the circles shrink, ultimately disappearing at the poles. Any attempt by me to isolate the radius calcs ends with disappointment. I understand the calcs are intrinsically tied to the center/origin coordinates but my very limited maths abilities has left me unable to extract anything, worthwhile.
The solution on this site -- http://dev.bt23.org/keyhole/circlegen/output.phps -- works but is written in PHP. I enjoy/like Python and would like to complete my project in this language. An attempt by me to translate left me with a sore head. I deemed installing PHP and adding a hook to the code as unappealing, almost obscene.
As you are the author, it seemed obvious the best place to start before i went too far afield, so any information,observation, assistance, advice, updates will be warmly appreciated.

many thanks,

Comment 2009-06-29 by None

my bad. This site http://dev.bt23.org/keyhole/circlegen/output.phps
doesn't work.Not enough research on my part.Now realise there is problem in google code. Apologies