Archive for the ‘Google Earth’ Category

Export all MyMaps to Google Earth

Monday, January 7th, 2008

====================

Update, 2nd August 2008

Suddenly it seems that the KML export from My Maps no longer pages like it used to, basically making this script redundant - which was always the intention!

So if your file has under 1000 features, then just use the link ‘View in Google Earth’ to get all the data. If you want the
actual data you can change the ‘output=nl’ to ‘output=kml’ to get the KML data rather than a Network Link to it.

====================

Oh dear, I think I should stay away from the Google Maps Group, following a post (about saving directions to MyMaps) on there a few days ago, realised the KML export is paginated, but there doesnt seem to be a way to get at the following pages directly. It flummoxed me for a while until guessed at the params to get the additional pages, success.

Then a post on there today, made me realise others are coming against this problem, so in traditional hackers** style, here is a little utility to create a multi page network link wrapper…

Export all MyMaps to KML

** follow the link for the definition I mean

Update: 18th Apr, we now download the first page of the map, 1) to get the number of items per page, it seems the link itself is no longer reliable, and 2) it means we can grab the title automatically :)
(note the download is discarded so I dont keep a copy of the data itself)

Export multi-destination (or dragged) route to Google Earth

Thursday, December 27th, 2007

Love keep adding destinations to your route, or even dragging the route to refine perfectly to your needs in the directions feature on Google Maps? But frustrated that this feature isn’t available in Google Earth?

… No, not implemented this feature for Earth (wouldn’t that be something!), but as a stop gap its a way to export your newly created directions on Maps, and open them in Google Earth! You get a freshly created folder containing each section as a separate route, ready for use as ‘one.

Multi Destination routing in KML for Google Earth

Google Earth Version Stats (Dec’07)

Friday, December 14th, 2007

 Only a quick post as its late, but just noticed this report had finished generating, took rather a long time, as just found our stats package has been mangling GE’s useragent string - anyway enough rambling, I know you just want to view the stats:

 Dec 2007 :: Google Earth versions accessing links on nearby

… make of that what you will - haven’t really drawn any conclusions from this…

(last set)

36 Blue Globes for your viewing pleasure.

Tuesday, November 13th, 2007

I notice Jonathan has finished uploading all 36 layers of the Blue Marble Next Generation imagery, that he has been processing for viewing in Google Earth. These are the full resolution imagery available, at an impressive 500m per pixel I believe, and preprocessed for reasonably quick loading - shouldn’t be *that* much slower than GE’s built in imagery.

This is a full set of 12 month variations for each of the original, topographic shading, and topographic & bathymetric shading variations of the original data.

If you haven’t already done so, load the layer now! Or if you already have it simply right click the top most ‘reference’ item and click Refresh.

… could be wrong, but think this is the first time that all layers are available for easy viewing in Google Earth.

Serving Google Earth static content with Apache

Tuesday, November 6th, 2007

This could probably be classed as technical post (gosh!), and is probably only of interest if involved in hosting content to be displayed in Google Earth or Maps etc.

I’ve been meaning to write this up for a while, basically a set of tips for setting up Apache 2.X for hosting content for Google Earth. The same tips can probably be used for other webservers but won’t begin to look at the various ways it could be configured… Also these could easily be placed in httpd.conf, but using .htaccess as the example as thats probably easier, and not all hosting providers allow access to the file. Much of the stuff here originates from YSlow, but adopted for what I know about Google Earth.

These settings assume you not going to change the content much, so is good for serving up large static content, or the ‘chrome’ for a large layer. Regally updated content is likely up be output from a script anyway so that can setup its own headers, I’ve also done quite a bit of work on getting PHP to output good headers, so will post that in a follow up post.
First and foremost is setting up the MIME type, to ensure the Google Earth is launched when a user clicks a link, so these lines are added to the .htaccess file:

AddType application/vnd.google-earth.kml+xml kml
AddType application/vnd.google-earth.kmz kmz
AddType application/xml dae

Next is the Expires header, which tells a UserAgent how long it can cache the content, we set nice future dates, which mean in the main the content will stay cached for a while, potentially saving quite a bit of bandwidth.

ExpiresActive On
ExpiresByType application/vnd.google-earth.kml+xml “access plus 30 days”
ExpiresByType application/vnd.google-earth.kmz “access plus 30 days”
ExpiresByType application/xml “access plus 30 days”
ExpiresByType image/jpeg “access plus 180 days”

I’ve included JPG here, as it’s often used with GE, esp. how with the introduction of PhotoOverlay. The same idea can of course be extended if you use png files for example.
Now Apache out of the box supports sending Last-Modified headers, which means conditional GETs can be made later, which will only return 304 Not Modified. I’ve seen suggestion to turn off Last Modifed headers (if you have far future Expires as above) - but after testing, I would NOT recommend this.

Next is Etags, now YSlow recommends disabling these in most cases, and Apache useually comes with them on, and can easily be misconfigured, esp. on clustered hosting, so they need to be turned off. I’ve dithered on this one for a while, it seems silly to disable a feature that could potentially be useful, however the clincher here is that I don’t think GE will use them, and besides we can save a few bytes be not sending them in the first place.

FileETag none

I’ve no evidence if it helps, but if you have enabled on the fly GZip compression, then you might get a small boost by turning if off. As GE doesnt support HTTP-GZip compression, and KMZ and JPG are both well compressed. The only small benefit might be if you have a KML based loader, that might get downloaded by the browser in which case it can GZip’ed. So turn it off globally in this folder, but turn it back on for KML:

AddOutputFilterByType DEFLATE application/vnd.google-earth.kml+xml

As a final tip, the following allows you to upload a index.kml file and it will be served as the index for a directory, doesn’t help performance, but useful in a few cases,

DirectoryIndex index.kml index.html index.php

Get all of the above in one file ‘ere, use or don’t use at will :)

Blue Marble NG - Google Earth (Rendered) SuperOverlays

Sunday, October 28th, 2007

Yes I know, its another way to view Blue Marble Next Generation imagery in Google Earth, but here Jonathan van Tuijl has taken the time to pre-process the full resolution 500m/pixel imagery into static files, meaning that hopefully the loading should be smother (at least when accessed from this side of the Atlantic!) and more refined as a its not relying on a server to dynamically generate the KML and images (even if it then caches it), as done here. We also hope to make available the full range of Blue Marble layers.

View the Blue Marble NG Overlays Homepage and download the Link

… doesn’t do any of the fancy fading out like the version here, which is designed to be left running :)

See the post in the KML group that started this little adventure, which I believe started as an exercise for Jonathan to find a way to slice up really large images, and generate a Google Earth SuperOverlay from that; as none of the ‘packages’ seemed to be able to manage it (I’ve tried it too!). So I joined in offering hosting - as think its a neat exercise in hosting really large datasets (7.4GB at last count) - now I have a powerful server. (famous last words…)

Buffalo, New York - PhotoSpot

Sunday, October 14th, 2007

While on a recent trip to the States, took this photo, stiched together from many shots with AutoPan Pro. Traditionally I have provided a GoogleEarth model using DigitalUrban’s panorama object, however this time will simply link to the placemark as provided by Gigapan.org:

View in Google Earth (but requires 4.2+ to take advantage of the PhotoOverlay - in full resolution glory!)

View in a Web Browser (using a flash viewer)

Thanks to Gigapan for providing this really super (and quite fast!) hosting for these high resolution images…

geotagged More Links for this location

Google Earth Black Box Recorder

Saturday, September 1st, 2007

Purely as a prototype, here’s a little script that records your flight in Google Earth for later review. (Wondering how you fly in Google Earth? See (or) here!!!)

Go here for the details and to get started.

This is recording the flight back to on my server, as that’s way easier than creating a local application. However it does mean its dependent on the net connection and my server for smooth recording. If this works out will seek better hosting! As mentioned its only a technical preview so its nowhere near perfect, but should be useful in a fun way at least :)

… technically it could be used to record movement in any mode, however it only records the camera position, which is almost ideal for the flight simulator, but not so useful otherwise.

Flying in Google Earth!!!!

Saturday, September 1st, 2007

Wow, what an Easter Egg! (Yes check it not really the first of April…)

You can now enable a Flight Simulator Mode, find out more on GEarthBlog here.

Beware tho its kinda hidden and might take a bit of fiddling to get it to work… basically you hold down Ctrl-Alt-A (capital) on windows. However I found I had to change my language settings in Windows Control Panel to ‘English (United States)’, I had it set to UK English, and try as I might it wouldn’t work. Closing GE, changing the language setting, and reopening, it worked first time. You can even change back to UK and it will still be available in the Menus, but the keyboard shortcut no longer works. YMMV.

I’ve long been a fan of MS-FlightSim, and installed lots of packages to get high-resolution imagry and meshes (often to great expense!), to find this in GE is simply mind-blowing.

One last thing, as I’ve never been a fan of keyboard for flying (as the primary controls), I see the mouse works quite well, and is responsive and intuitive, thanks guys and gals!

FlashEarth+GoogleEarth Part 2

Wednesday, August 29th, 2007

Following the amazing interest in the networklink for embedding FlashEarth inside Google Earth 4.2, have performed a few updates…

  1. The zoom is a LOT closer matched, this is thanks to the inspiring formula: $z = (-1.4956 * log($range/1000) + 16.529; (yes really!); brought to you by the wonder of plotting a graph in Excel, creating a trendline, turning on the formula display option. Probably could get an even better match with more patience, but probably about as good as it going to get really.
  2. Removed the title and the directions links, makes the balloon looks a bit nicer, couldn’t get it to go transparent for me tho… suggestions welcome.
  3. When the network link is now a folder so can choose the size of your popup :) The previous version is now the ‘medium’ one.

Though the magic of the web, you get 1) and 2) automatically, if want 3) just download it again:

Open in Google Earth (Required: GE 4.2 Windows)

Thanks again to everyone involved.