Category Archives: Uncategorized

CoG calculator: Third time lucky

The center of gravity calculator previously featured on Ogle Earth, although it worked for me on my Mac, didn’t seem to work for many others. Via helpful comments, it began to look like it might be a Mac vs. PC thing.

I can now confirm that this was indeed the case. Saving a folder with placemarks to the desktop produces KML that differs according to the operating system you’re using. The unexpected part is that it’s the Mac beta which produces the most complete KML, whereas the PC version produces something quite sparse (though well-formed) that doesn’t preserve the state of the saved placemarks. Here is the PC file, and here is the Mac file.

One difference is that the PC saves a KML file with a <Folder> element at its root, whereas the Mac uses <Document>, into which it places a <Folder>. But more importantly for debugging the calculator, the Mac version also saves <visibility> and <open> for each placemark, so that later, the folder’s state is preserved when the KML is uploaded back into Google Earth.

The calculator assumed each placemark had such a visibility tag, and calculated the center of gravity only for placemarks flagged as visible. Since the PC version contains no visibility tags, the script found 0 visible placemarks, hence the division by zero error.

I have now removed the visibility test from the calculator. All placemarks are counted, visible or not. The calculator now works for me with PC-generated files that broke previously. Do let me know if you still have problems. Once again, the center of gravity calculator.

[Update 2006-02-11 12:48 UTC: And not a minute too soon — the latest Mac version of Google Earth (3.1.0617.0 beta) no longer saves down folders with visibility tags.]

Volkswagen & Google Earth: It’s serious

A few weeks ago at the Consumer Electronics Show in Vegas, when Volkswagen and Google announced they’d cooperate to build a prototype 3D navigation system built on Google Earth, some GIS pros were skeptical, and as far as I was concerned, convincingly so. The wireless technology just isn’t there yet, they said. And maps are clearer to use.

Even so, Volkswagen’s Electronics Research Laboratory chose to issue a press release today that adds detail and seems to strengthen their commitment to the project. They’ll get help from nVidia, and a prototype appears to be well under way:

Highlights of Volkswagen’s prototype vehicle include a vehicle-centric touchscreen interface to Google Earth with state-of-the-art graphics, accurate 3D maps and real-time traffic updates and routing. This open system harnesses the power of the web to maintain a dynamic database of current information on restaurants, dealerships, gas stations and other points of interest that can be overlaid directly onto the user’s 3D map. With the increasing accuracy of GPS, dead-reckoning and laser-radar imaging, as well as ever-improving car-to- infrastructure communication, this prototype will be available on showroom floors in the near future.

Center of Gravity II

An accurate center of gravity calculator for Google Earth is now available here. All the code is Brammeleman‘s, taken from his calculator page here, save for the one final altered latitude correction, which places the center of gravity closer to the poles — at the correct position.

Abbreviated instructions: In Google Earth, collect your placemarks in a folder and save that folder to your hard drive as a KML file (not KMZ). Upload this file into the calculator and open the returned file in Google Earth. Voila.

So what does this center of gravity calculator do, precisely?

Practically speaking, the spot you get back minimizes the total distance people at placemarks will need to travel in order to meet up together. And if you calculate the center of gravity for just two placemarks, the straight line you can draw through all three points will be the shortest distance as the jumbo jet flies between your two placemarks.

newcog.jpgMathematically speaking, the code first finds the center of gravity for given points of equal mass on the surface of a sphere in three dimensional space. (The center of gravity will thus be inside the sphere.) It then finds the point on the sphere closest to the center of gravity by projecting a straight line from the center of the sphere through the center of gravity to the surface of the sphere.

The algorithm assumes Earth is a sphere, even though it is actually a geoid, so errors of tens of meters will persist. Correcting for those is something I am two PhDs short of being able to do.

The original story is three posts down, here. As a result of the correction, my family’s actual center of gravity is now 43km further north, in Bree, near the Dutch border.

Google Earth & Fiat launch Winter Olympics competition

This one I hadn’t seen coming: Google Earth and Fiat are cobranding a competition that highlights the Turin Winter Olympics. You register via a slick site, and are then given a network link to download. This takes you to the Olympic area around Turin in Google Earth, which now boasts upgraded high resolution images.

Your task: Pick one of the dots on the map ÇƒÓ any dot will do (it’s not exactly a skills-based competition.) The four people whose dots prove closest to the hidden treasure by the end of the contest will win a New Fiat Sedici 4×4. As the cars cost $20,000 and the competition takes 3 minutes, this one is a no brainer.

While you’re surfing around Turin, why not take advantage of a KML file marking all Olympic venues, posted to Google Earth Community by Gommunity.

(PS. A preference for truth in advertising compells me to note that this competition is not “the first contest that lets you look down on the world from on high.” Don’t forget Adidas.)

(Via Touristime.it)

[Update 2006-02-02: 00:12 UTC: Heh. From the small print: “The Fiat Sedici can be awarded as a prize to contest winners in the following countries: Italy, France, Great Britain, Austria, Switzerland, Greece and Spain.”]

News round-up: Google Earth’s competition

Scrappad reports that ESRI has released its ArcGIS Explorer as a closed beta, which apparently means that scores of GIS pro bloggers will be playing with it without being allowed to blog it due to NDAs. How frustrating has that got to be? :-) Meanwhile, Geography 2.0 provides a non-NDA-constrained overview of ArcGIS Explorer, and how it will likely be positioned against Google Earth.

For NASA World Wind users comes news of an important plugin, Shockfire’s KMLImporter, which does precisely that. I’m on a Mac so I can’t test it, and I doubt it has the functionality of the network link, but this plugin opens a wealth of static content to World Wind users, including 3D objects and overlays found on numerous Google Earth content sites. I’ll be on the lookout for feedback on the usefulness of the plugin. (Here is the developer’s blog.)

The release of KMLImporter is not so important for Google Earth surfers, but it is important for KML content developers, who might soon want to start checking their work in both Google Earth and World Wind — just like how web developers check their work in IE, FireFox, Safari, etc… Let’s hope the geobrowsers manage to avoid the cross-app rendering quirks that have so plagued web browsers. (Via Le Blogue du CFM de Guadalajara)

Of cyclones and Seattle wifi

Two items with a Pacific theme this morning:

It’s always hurricane season somewhere. In the South Pacific, cyclone season opens with Jim, bearing down on this New Caledonian blogger, who’s following it and related webcams in Google Earth with this hurricane tracker, an oldie but good one.

On the other side of the Pacific, Seattle Wireless, a community wifi network, now has a Google Earth network link (KML) to accompany its Google Maps mashup.