ink_polaroid
Sysop
Reged: 01/01/05
Posts: 1868
Loc: SF Bay Area, CA
|
|
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.]
|
gbonny
Tourist
Reged: 03/20/04
Posts: 383
Loc: Los Angeles
|
|
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)
|
mcshea98
Master Guide
Reged: 04/09/05
Posts: 488
Loc: USA
|
|
Ink_Polaroid,
Looks great to me. Here are a couple circles near the pole, but they look fine.
|
ink_polaroid
Sysop
Reged: 01/01/05
Posts: 1868
Loc: SF Bay Area, CA
|
|
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.
|
blt
Cartographer
Reged: 01/25/03
Posts: 638
Loc: Santa Cruz, Ca
|
|
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
|
seer
Master Chronicler
Reged: 12/09/02
Posts: 3107
Loc: Northern California
|
|
Very, very nice idea.
-------------------- Be seeing you,
Seer
|
ink_polaroid
Sysop
Reged: 01/01/05
Posts: 1868
Loc: SF Bay Area, CA
|
|
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. )
|
ink_polaroid
Sysop
Reged: 01/01/05
Posts: 1868
Loc: SF Bay Area, CA
|
|
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.
|
blt
Cartographer
Reged: 01/25/03
Posts: 638
Loc: Santa Cruz, Ca
|
|
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
|
ink_polaroid
Sysop
Reged: 01/01/05
Posts: 1868
Loc: SF Bay Area, CA
|
|
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.)
|