Category Archives: geospatial

Why should scientific papers be "spatially enabled"

Now that I'm starting to build the databases needed for my new lithological database, I'm coming back to how I created my Devonian database.  The papers I generally worked with contained reports from the field, including lithology, measurements, location, etc.  That can be a LOT of information.  Collecting it all from each paper is time consuming to say the least.  Howevever, there was another problem…

That problem is being overly focused on the data in front of you and not the data you need.  The forest for the trees problem, if you will.  In the earth sciences, there are a number of research biases.  North America and Europe are far better studied than Africa, for example.  Thus, most publications are focused in those regions.  Similarly, some specific localities can be studied extensively, because of location or because of something interesting, while others are rarely visited.  This becomes a problem when you keep entering papers from the same area but miss important work from more rarely studied areas.

To combat this problem for the Devonian database, I created a “recon” or “search” database.  I tried to find any paper that might be relevant to the project and collect some basic information such as time range, and the general lat/lon area of the field study.   I could then map these records in a GIS application (at the time, I was using MapInfo, Terra Mobilis, and PGIS). 

As an example, I found about 500 of these records remaining in my archives.  Here is a global map example:

The yellow dots are entries in the Devonian Lithological Database.  The blue rectangles are “coverages” for particular scientific papers.  Where papers overlap, the blue color gets darker.  This is more evident regionally, for example:

As you can see, I can now show the data I have versus the field areas represented by papers I've found.  Careful examination of this sort of map highlights both papers I might not need to bother with (blue rectangles with lots of yellow dots) versus papers I should prioritize (blue rectangles with few if any yellow dots). 

These maps by no means represents all the papers I looked at in developing the database.  I think I physically at least looked at 3000-4000 papers but only 500 are represented in the above maps.  So, to include everything, it would take a great deal of work.

In any case, in this short example, I hope i've shown that in at least once case that geospatially enabled papers can be very important.  Now, the question is how to implement it!

More Snow Leopard Geotagging With Services: Google Earth

As mentioned before, I feel geotagging is an important part of image metadata. In a previous post, I showed a simple Applescript-based Snow Leopard service to set images to a commonly used location.

With a slight modification to the Applescript in the service, you can pull the location out of Google Earth and embed your photos. I was really excited when Picasa supposedly had this feature, but it’s not mac compatible! Now, iPhoto can do the same thing.

Step 1. Set up the Automator Workflow as described in a previous post.

Step 2. Use the following Applescript

 

on run {input, parameters}
 local myLongitude
 local myLatitude
 tell application "Google Earth"
  set myView to GetViewInfo
  set myLongitude to longitude of myView
  set myLatitude to latitude of myView
 end tell

 tell application "iPhoto"
  set mySelection to selection
  repeat with myImage in mySelection
   tell myImage
    set longitude of myImage to myLongitude
    set latitude of myImage to myLatitude
    reverse geocode myImage
   end tell
  end repeat
 end tell

 return input
end run

Snow Leopard Services to Geotag iPhoto Images

In one of the updates to iPhoto 8, Apple added the capability to use Applescript to geotag photos – that is, embed latitude, longitude, altitude, and other geographic information. Adam Burt noticed this update and suggested a simple Applescript to geotag a photo with a specific latitude and longitude (see here).

It's quite simple to go from his script to a simple service in Snow Leopard. But first, why on earth would I want to do that? I'm keen on embedding as much metadata in my photos as possible, including location. However, it can be a pain to set a specific site over and over. An example of this problem is my home. Every photo shot at my house should be geotagged with that location, but making sure all the photos are properly set is difficult.

Now, imagine a service that I can select from a menu (or key combination) that would set the geotag for every selected photo in iPhoto to the coordinates of my house?

To create the service, open automator and create a service.

Set the service to recieve no input from iPhoto.

Add the “Get Selected iPhoto Photos” action to the workflow. (this might not be required, however)

Add a run Applescript action.

Set the code to look something like this:

on run {input, parameters}
 tell application "iPhoto"
   set mySelection to selection
   repeat with myImage in mySelection
     tell myImage
       set longitude of myImage to -10.0
       set latitude of myImage to 10.0
       reverse geocode myImage
     end tell
   end repeat
 end tell
 return input
end run

Now you can have several services set to specific locations you commonly use.

Thanks again to Adam Burt for the tip!