Google
Official Google Earth Download Site

Google Earth Community System Reliability: MEDIUM

Support and Answers >> KML Discussions (read only)

Jump to first unread post. Pages: 1 | 2 | 3 | 4 | >> (show all)
ink_polaroidAdministrator
Sysop


Reged: 01/01/05
Posts: 1868
Loc: SF Bay Area, CA
KML Circle Generator
      #23634 - 04/19/05 04:17 PM

At least a couple of people have shown an interest in being able to generate circle primitives. I needed to do exactly that earlier today, and because neccessity is the mother of invention...

KML Circle Generator

It's not a real solution, but it's a pretty useful hack. It'll generate a LineString path for you that looks just like a circle.

You'll need the coordinates of the center of your circle, and either a radius (in meters) or the coordinates of a point on the circumference.

I haven't tested extensively, but it seems to be fine for the most part. (Theoretically there's a chance it'll b0rk if you try to do anything near the poles, although I haven't made it do that yet.)

Comments, improvements, bug reports &c all welcome. The source is here.

[Note to math geeks: I'm using a slightly modified Haversine formula to calculate the distances. It's pretty accurate, but because it assumes a spherical earth, it grows slightly inaccurate over large distances.]


Post Extras: Print Post   Remind Me!   Report this Post  
gbonny
Tourist


Reged: 03/20/04
Posts: 383
Loc: Los Angeles
Re: KML Circle Generator [Re: ink_polaroid]
      #23650 - 04/20/05 01:09 AM

I'm looking for a past post that says the Keyhole globe is indeed a sphere... Still looking, maybe it's faulty memory in one of MY hemispheres.

--------------------
gbonny

Neutiquam erro (I am not lost)


Post Extras: Print Post   Remind Me!   Report this Post  
mcshea98Moderator
Master Guide


Reged: 04/09/05
Posts: 488
Loc: USA
Re: KML Circle Generator [Re: gbonny]
      #23967 - 04/23/05 04:09 PM

View in Google Earth         View in Google Maps (498 downloads)


Ink_Polaroid,

Looks great to me. Here are a couple circles near the pole, but they look fine.


Post Extras: Print Post   Remind Me!   Report this Post  
ink_polaroidAdministrator
Sysop


Reged: 01/01/05
Posts: 1868
Loc: SF Bay Area, CA
Re: KML Circle Generator [Re: mcshea98]
      #24043 - 04/24/05 05:19 PM

Yeah. I spent some time trying to get it to barf, and couldn't. I have ideas about how it could be improved, but I'm waiting until after the promised update before I do anything.

Post Extras: Print Post   Remind Me!   Report this Post  
blt
Cartographer


Reged: 01/25/03
Posts: 638
Loc: Santa Cruz, Ca
Random thoughts [Re: ink_polaroid]
      #24053 - 04/24/05 07:25 PM

Inkster-
I often feel the urge to 'get lost' in keyhole. I currently do this by spinning the globe with my eyes shut, but this gets a little tedious. Why do I do this you ask? Well, if I turn off all placemarks and names, I'm forced to explore the area and eventually I find that I can make a pretty good guess where I've ended up. It's a bit of a game and a goood waste of time. The only rule is I won't allow myself to fly higher than 10-20,000 feet. Do think it would it be possible to generate a network placemark that would take you to a random place each time you click on it?
-
Brad





Post Extras: Print Post   Remind Me!   Report this Post  
seerAdministrator
Master Chronicler


Reged: 12/09/02
Posts: 3107
Loc: Northern California
Re: Random thoughts [Re: blt]
      #24055 - 04/24/05 07:44 PM

Very, very nice idea.

--------------------
Be seeing you,
Seer


Post Extras: Print Post   Remind Me!   Report this Post  
ink_polaroidAdministrator
Sysop


Reged: 01/01/05
Posts: 1868
Loc: SF Bay Area, CA
Re: Random thoughts [Re: blt]
      #24059 - 04/24/05 08:24 PM

I'll try to have something for you by this time tommorrow. (I'll just assume you want the random place to be somewhere in a hi-res area. )

Post Extras: Print Post   Remind Me!   Report this Post  
ink_polaroidAdministrator
Sysop


Reged: 01/01/05
Posts: 1868
Loc: SF Bay Area, CA
Re: Random thoughts [Re: ink_polaroid]
      #24062 - 04/24/05 09:13 PM

View in Google Earth         View in Google Maps (432 downloads)


Okay. I knocked this one up in the break between Star Trek and CSI. It's not quite automatic. You'll need to right-click on the folder and hit "refresh" between views to generate another random location.

I'll refine it a little tomorrow. Right now it's a random location anywhere on the globe, so there's about a 78% chance you'll end up in an ocean.


Post Extras: Print Post   Remind Me!   Report this Post  
blt
Cartographer


Reged: 01/25/03
Posts: 638
Loc: Santa Cruz, Ca
Re: Random thoughts [Re: ink_polaroid]
      #24073 - 04/24/05 10:31 PM

Inky -

Awesome job and many thanks! I don't know how you can keep it from hitting ocean unless you have a big table of some kind on your server. I'm not too sure it's important since it only takes a few clicks to hit land. If you change it, you might want to set the viewpoint to around 10,000 feet, give it some tilt and a random heading.

Thanks Again,
Brad


Post Extras: Print Post   Remind Me!   Report this Post  
ink_polaroidAdministrator
Sysop


Reged: 01/01/05
Posts: 1868
Loc: SF Bay Area, CA
Re: Random thoughts [Re: blt]
      #24134 - 04/25/05 12:28 PM

View in Google Earth         View in Google Maps (429 downloads)


Try this one. I grabbed the coordinates of a few dozen hi-res areas and it should now dump you in or near one of them. Same process applies -- right click on folder and refresh for each new random location.

(The coords are *really* rough, so it ain't perfect. You should still get something interesting more often than not, though.)


Post Extras: Print Post   Remind Me!   Report this Post  
Pages: 1 | 2 | 3 | 4 | >> (show all)




Extra information
0 registered and 10 anonymous users are browsing this forum.

Moderator:  Hill, Jumble, jrohlf, Kempster, mcshea98, jeffryv, dulce, esterrett, regionator, NormB, Frank_McVey, geus, ZeroDeeFeX, LaBelleTerre, vagabondsailor, SupersonicBuddha, DWebb, BeadieJay, TheLedge, Cyclonic, no_stranger, LuciaM, tekgergedan, ManoM, cantarell, toponym2006, Noisette, danescombe, Michal_Drewniak, mutex, marinerfan, Delta102, bebop, MarkAubin 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating: ****
Topic views: 29205

Rate this topic

Jump to

earth.google.com    bbs.keyhole.com

*
UBB.threads™ 6.5.1.1