zs blog

webnotes of a skeptical eastern european

Saturday, September 30, 2006

Bedforms in Matlab - everything you wanted to know about ripple marks and cross beds

David Rubin's bedform-generating code has been implemented in Matlab (in fact, it has been out there for a while). It is a great learning, teaching, and research tool that can be downloaded as part of an USGS open file report. Strongly recommended to anyone having some interest in sedimentary structures, bedforms, and cool Matlab graphics.

That reminds me of something else: it would be nice to have a Matlab version running on Intel Macs. I hope Mathworks will keep its promises and have something ready by early 2007. Having to reboot the iMac in Windows XP is an acceptable solution, but I could live without it [although even Windows XP looks OK on this kind of hardware :) ].

Labels: , ,

Sunday, August 20, 2006

Georeferencing photos on a Mac

Not long ago I managed to georeference some of my photos using GPS measurements. Before I forget how I did this, here are some notes on the process. The key piece of software is GPSPhotoLinker, written by Jeffrey Early. After downloading and installing this nice little program, the next step is to get the GPS tracks from the GPS unit. For some reason, GPSPhotoLinker did not do this for me; so I downloaded GPSBabel, connected my Garmin Vista Cx to the iMac, and saved the tracks in GPX format. [GPSBabel is the same utility that is used inside GPSPhotoLinker]. I tried to open the GPX file in GPSPhotoLinker, but it did not work. The problem was that some of the tracks on the GPS unit were actually saved -- and saving tracks on a Garmin GPS unit (and maybe on other units as well, I don't know) results in losing the time stamp from each datapoint. GPSPhotoLinker apparently is not able to just ignore this part of the GPX file; the only solution was that I manually deleted all the saved tracks from the GPX file. After that, everything went pretty smoothly. GPSPhotoLinker finds the GPS points that are the closest in time to the time stamp of the photograph and writes the latitude and longitude into the EXIF header of the jpeg file. You can choose between 'snapping' photo locations to the nearest GPS datapoint or to interpolate between two points to find the best estimate for the place where the photo was taken. It is important, of course, to record a fairly large number of GPS points when you are taking the pictures.

Once I had the photos tagged with the geographic coordinates, I had two options to display them in the context of a map: either relying on Smugmug, the photo-hosting web service that I use, or on a cool iPhoto plugin called iPhotoToGoogleEarth. With Smugmug, both Google Maps and Google Earth can be used to look at the photos; the drawback is that the displayed pictures are small and you have to go go back to the Smugmug page to see the photos in a reasonable size. The iPhoto plugin generates a kmz file that can be opened with Google Earth and includes all the photos in a reasonable size, that, of course, can be adjusted by the user). The advantage is that you do not have to leave Google Earth in order to look at the photos.

Here is my first try at doing the gereferencing, as shown by Smugmug in Google Maps. It is not a bad idea after all to have a GPS unit handy when you are traveling and taking photos.

PS. In addition to the saved tracks, the other thing that GPSPhotoLinker does not like in the GPX file is the part of the header that refers to the geographic bounds of the file, e.g., "bounds minlat="-51.725563835" minlon ="-98.491744157" maxlat="43.777740654" maxlon="131.500083692"". You have to delete that in order for GPSPhotoLinker to read the file.

PS 2. There is always more to learn. I thought that the ideal workflow for georeferencing photos would be to (1) do the tagging in GPSPhotoLinker, (2) import the photos to iPhoto, (3) export the ones I want to post on the web, and (4) put them on Smugmug. It turns out this does not work well; all the photos I took in California (and were correctly labeled by GPSPhotolinker) ended up in Kamchatka. The point is that the georeferencing must be done (or redone) after the photos are exported from iPhoto.

Labels: ,

Sunday, June 18, 2006

Limited or no usability

A few weeks ago we decided to buy an iMac in addition (or, as a replacement) to our four-year old Windows laptop. Clearly, my opinion is biased because, after making an investment like this it is much more difficult to see the disadvantages. Clearly, my preference for MacOS X is also influenced by the fact that it is cool to own a Mac.

Whatever the reasons are, the bottomline is that working on a Mac is so much more pleasant that doing or trying to do exactly the same things on a PC. Yes, in most cases it is possible to do exactly the same things on PCs as well. If you enjoy downloading updates. If you enjoy learning about DHCP, ports, DNS, etc. If you enjoy restarting your computer three times in a row. I do not enjoy to do any of these things. That's why I like my new iMac.

To be more precise, after getting the iMac we kind of forgot about the Windows machine. We only noticed recently that it is having problems connecting to the internet (through the same wireless router that both Macs are happily using ever since we told them to do so). A warning appears that says something about "limited or no connectivity". If I try to "repair" the connection, it keeps thinking for a while and theen it says that it could not fix it. What's next? I go online (on the Mac, of course), and do a search on "limited or no connectivity". Lots of results, one is more obscure and useless than the other. After trying several of the suggested tricks, I just give up.

So we just spent at least a few hours trying to fix this -- with no success. The PC has still "limited or no connectivity" -- in other words, it is pretty f%^$#@! useless. I am not saying that I never had any problems with the Mac. But even when I had some, it was fast and enjoyable to fix them. I know it sounds like I have joined a cult, but it does feel like my life has changed since we have the iMac.

PS. To be fair (a couple of weeks later), since then we had comparable problems with the Macs as well, so it is unlikely that it was a Windows XP issue. Still, I love the new iMac :) .

PS2. Finally, it works. I replaced the Linksys router with an Airport Extreme base station and set it to share the IP address that it receives from the cable modem between the other machines. I have to admit however that it was *not* easy to set it up the right way; with the default settings, we could only connect one computer at a time and it took ages for us to hit upon the right combination of settings. I contacted Earthlink for help, but the advice I received was pretty close to useless.

Labels:

Saturday, February 04, 2006

Digital Earth

Last weekend I discovered (1) that Google Earth was even more amazing than I had previously thought [and now they have a Mac version as well!]; and (2) there is a lot more out there in terms of digital geography if you look a bit harder.

Here is for example this USGS site from which you can download (with some patience) not only the usual satellite imagery but digital elevation models (DEMs) as well, for pretty much the whole globe [thanks to my friend Radu Girabcea for pointing me to it]. Once you've got a DEM, you can use 3dem, a nice little piece of freeware to display the elevation models in 2D and 3D and to drape georeferenced images over the topography. DEMs are available (for free -- at least at this point) with a ~10 m resolution for most of the US and a ~30 m resolution for other areas (I was especially excited to savor the detailed topography of the Carpathians -- the more familiar you are with a place, the more illuminating it can be if you examine the morphology).

Another thing worth taking a look at is NASA's version of Google Earth, that is, World Wind. With one click, you can switch from Landsat images to USGS topographic maps [although I often have problems with the server connection]. Can it get a lot better than this?

Labels: , ,

Sunday, September 18, 2005

Shameless plug for Google, Smugmug, and my own photos

Uploaded some new (and not-so-new) photos to smugmug. Here are a few from our recent geological trip to the Canadian Rockies (more precisely the Caribou Mountains near McBride, British Columbia); these were taken during the trip with my father and Aniko in Rocky Mountain, Grand Teton, and Yellowstone National Parks; and, finally, a bunch of nice ripple marks from Sea Rim State Park in Texas.

I have to say I am very happy with smugmug; it is not free (the cheapest membership is 30$ / year), but you certainly get what you pay for. I think the design and the style are great, you can upload and view photographs as large as you want, etc. -- see their list of advantages here. And recently they have adapted the Google Maps API to add mapping capabilities to the photos; that is, you can type in a latitude and longitude for your photo and smugmug will place a tag on the map. Check this out for example. I think Google is making fantastic progress with both Google Maps and Google Earth; who would ever want to go back to Mapquest or other indistinguishable map services after trying Google's maps?

Labels: