Archive for the ‘Technology’ Category

Introducing Tiled Maps

Wednesday, November 16th, 2011

I’m proud to announce Tiled Maps has been accepted into the iTunes app store and now available for purchase. TiledMaps iconTiled Maps lets you take your maps with you where ever you go. The maps are stored on your iOS device so you’ll have access to them when you’re offline, which is great if you’re keen on taking long walks beyond cellphone coverage like I am. Tiled Maps is based on the TMS specification just like Google Maps and OpenLayers. Further information on how to prepare maps and load them into the app is available on the guide page.

Tiled Maps takes full advantage of what ever device it is on, meaning a specialized interface for iPhones and iPads, not just a stretched screen like some older map apps. The map can follow your location and even rotate the maps to match the way the device is facing if you prefer to be “in the map”.


TiledMaps iPad screenshot
TIledMaps in the app store now

Restore colour to iPhoto 9.1.5

Tuesday, July 12th, 2011

Apple has just released iPhoto 9.1.5 and has continued its trend towards dull grey icons, which I really don’t like. So I’ve bundled up the coloured icons from 9.1.4 and simple instructions for their installation. Someday I might automate the installation, but for now it’s just a manual copy (and authenticate).

Download iPhoto9ColuredIcons

Update 2012-01-22: I’ve tested this in iPhoto 9.2.1 and it seems to be working fine.

Geotiffs: Stage 1 seamless USGS map tile sets

Tuesday, June 7th, 2011

For a little while now I’ve been manipulating the excellent USGS geotiffs to fed my PCT mapping fetish. Since I’ve worked out a good enough system I thought I might share it with the world.

First off you’ll need a bunch of stuff installed on your computer.

With those installed you’re ready to follow my process.

1. Remove the collar

The USGS maps that I’ve been using come with a ‘collar’, that bit around the outside of the actual map data that you’d have to cut off if you were printing them out and sticking them together.


USGS maps with collars

Before cutting the collar off make sure to keep a copy of the original tiff because most image editing programs will lose the geo data when you press Save. In Photoshop I had to convert the image to RGB mode so that I could make the outside part transparent. It’s important not to change the size of the image. The embedded coordinates are for the corner of the tiff even though the map doesn’t reach there. Save the image and get back to the command line for step 2.

USGS maps with collars

2. Restore the geospatial data

The new tiff you have just saved does not have the embedded coordinates that it started with. So long as you kept a copy of the original file you can reinstate the data using the following command and the gdalcopyproj program.

> gdalcopyproj.py original_file.tif new_file.tif

3. Create a Virtual Tile Set

If you’re combining multiple maps you’ll either need to merge them into one large file or create a virtual tile set like this

>gdalbuildvrt -srcnodata b4 -hidenodata merged.vrt *.tif

The “b4″ tells GDAL that band four of your images is the transparency layer, and the “hidenodata” tells it that when two maps overlap, hide the one that has no data (is transparent). Without that the transparent collars of the geotifs erase useful content from geotifs they join up with.

You can merge the files like this

> gdalwarp -co COMPRESS=LZW *.tif merged.tif

But it won’t do the compression until the end, so with USGS maps you’ll be generating files over 1GB even if you only have a few source maps. The virtual tile set method is definitely quicker and takes less disk space.

4. Cutting the tiles

The following command will take either your merged geotif file, or the virtual tile set as the first parameter and an output directory as the second (which will be created if it doesn’t exist).

>gdal2tiles.py merged.vrt tiles

The process can take quite a while, but it starts with the most detailed layer and each one after that is about 4 times faster than the previous one. When it’s complete you’ll have a full TMS tile stack ready for use on web map systems such as Google Maps and OpenLayers and my iOS app Tiled Maps. Next time I’ll post the scripts I use to optimise a tile set down from ~1.7Gb to 700Mb.

Adding locations to iMovie ’09

Tuesday, March 10th, 2009

The latest incarnation of Apple’s iMovie has many cool new features and I’m coming around to using it rather than iMovie HD 6 that I’ve kept hold of all these years. Among them is an animated globe that draws a line Indiana Jones style.
Globe in iMovie '09 As great as that seems you’re stuck with the 1600 or so locations that Apple chose. You can rename them but not change the coordinates. That’s where iMovieLocationEditor comes in. It simply adds new locations along with the names you’ve chosen (can be changes within iMovie just like the originals). You can type in the coordinates in you know them but it’s much easier to find it in Google Earth and then press the big button to import it into iMovieLocationEditor.

Update
Apple changed something in iMovie 8.0.1. If you’re not seeing the changes appear in iMovie download version 1.03 and give that a try. If you think you’ve corrupted your location list you can download my backup.

GPS track interpolation in iPhoto ’09?

Wednesday, February 18th, 2009

Anyone who would be interested has probably already heard about the Places feature of iPhoto ’09. Usinghidden tables in iPhoto database embedded Google Maps. Once you’ve done that you can browse photos by location and make some very nifty photo albums with maps. There’s more to it than that but I’d be about the millionth person to review the new features of iPhoto ’09 if I did so, so I won’t. Instead I’m going to tell you about a feature that is missing, but one that Apple have clearly been playing with.
My Geotagger program has been out for a few years now and people have been happily (and least I think so) geotagging their photos. If this is done before importing them to iPhoto everything is fine, but doing it once they are already in iPhoto’s database means that iPhoto doesn’t know about the change and consequentially won’t draw these photos on the nice new maps Apple have added. So to find a solution for this I’ve been digging around in iPhoto’s database file. It’s a simple SQLite database but I haven’t fully solved it that part of the equation yet.
The interesting thing I found, and the reason I’m telling you about this before I have finished an update to Geotagger, is that in the database I found two unused tables. For those of you that don’t know about database and tables pretend I said I just found two very interesting lists. The tables are called SqGpsTracks and GpsTracksEventsJoin. What this tells me is that Apple were working on the ability to link a GPS track with an iPhoto event for people that may have a GPS Datalogger and a camera as separate devices. iPhoto would then be able to match up the time a photo was taken with the GPS log and work out where the photo was taken. This process is pretty well documented already and I’ve been doing it for ages using Jeffrey Early’s excellent GPSPhotoLinker. It could also mean the display of routes on the embedded maps, but that can’t be proven at this stage.

Though I welcome this feature for the masses I have never fully trusted iPhoto to do any editing of my pictures. I”m quite happy doing all the editing and geotagging before hand and just using iPhoto to store and display pictures, but for those that want an integrated solution this would definitely be a step forward.

UPDATE: Others have been discovering similar things, Adam looked in the nib files and found more proof that Apple is working on interpolation.

StrokeMe

Friday, February 6th, 2009

My first iPhone app has been published. It’s pretty simple, as most iPhone apps are, and I’m definitely catering for the current fad in entertainment. StrokeMe is $0.99 USD and was written in part to amuse my girlfriend. It shows a photo then plays a sound and vibrates when you stroke the screen. The idea was it’d be a way for her to pretend to play with her cat called Woods while she was at work. Of course, not many people will want to play with Woods (though he is nice enough) they’d want to take their own photos and record their own sound, which is exactly what StrokeMe is all about. Taking from the built in camera or the photo library users can configure the app to show what ever photo they want and record their own sound to play. I had thought it be good to keep a picture of your children and a recording of them where ever you go, but I’m getting the impression what people are taking photos of each other. What ever you want, StrokeMe is there to play with. So please give it a try, and tell your friends.

 

 

I’ve got a proper game in the works too, but the UI needs a lot of work. More on that soon.

Google Earth 5 is out

Tuesday, February 3rd, 2009

Google Earth 5 has just been released and it includes some interesting features. Top of my list is that they have fixed the problem of only drawing the first image in a KMZ files (like those produced by my iPhotoToGoogleEarth plugin). There are other things like being able to look at historic data and under the (animated) sea, but I think you’ll agree seeing your own photos on the map is far more important. :)

Geotagger 2 – beta testers needed

Tuesday, December 2nd, 2008

I’ve been at my new job for two weeks now and I think my brain is finally starting to warm up after seven months of thinking of pretty much everything other than software development. So now I am pleased to announce Geotagger 2 is just around the corner. I’ve moved pretty much all the code into Objective-C rather than Applescript and thus been able to add a progress indicator to show how many images it has left to process. Personally I don’t want to see hundreds of photos of a city all tagged at a single point within in, but some people have good reasons for tagging lots at the same time and now they’ll know when it’s finished.

Before I start uploading it to bigger sites I’m inviting anyone checking this site to download version 2 and tell me how it goes. I only have one Mac here to test on, so I while I know it works on an Intel running OS X 10.5 I can’t be sure about anything else. So pleeeeease send me feedback.

I’ve also included the latest build of exiftool so it should work with any file type that exiftool can write GPS data to.

Google Earth 4.3 only showing first image

Thursday, October 9th, 2008

It’s been brought to my attention that Google Earth 4.3 only shows the first image that is viewed in a the KMZ files produced by iPhotoToGoogleEarth. After that all images in that file are shown as just question marks. This is not a bug in iPhotoToGoogleEarth, it complies with the KML specification and has not changed in a while. Google Earth however has changed and other people have noticed it too. According to this bug report you can view the images if you decompress the file first (rename the output to have a “.zip” extension and double-click it), or use the PC version of Google Earth. Other than that it’s just a matter of waiting for Google to fix the bug.

 

UPDATE: Now that Google Earth 5 is out the issue has been resolved. Please upgrade your software to see all the photos that iPhotoToGoogleEarth produces.

iPhotoToGoogleEarth 2.0

Tuesday, February 26th, 2008

I have updated iPhotoToGoogleEarth to work with Leopard and iPhoto ’08. To get it released quickly I decided to remove the NMEA file integration but that sort of editing is pretty simple to do in Google Earth itself.

I have also taken an evening to get this blog running on WordPress so I’ll be able to keep it updated more often. Not that I’ll be saying much here because most of what I’m doing now revolves around moving to Japan. I’m starting by walking the length of the country to learn more about the people, culture and language. Then I’ll find somewhere cool to settle down and try teaching English for a while. The site will look a little strange as I can only work on it a few hours a night, but eventually I’ll have it looking smart again.