Adding geolocation support



Hi all!
  I recently wrote a simple app to add geotagging information to JPEG
files ( http://www.mardy.it/2009/04/geomappa.html ) and now I'm trying
to have geolocation support in f-spot.

I created C# bindings for the map widget (OsmGpsMap) and created a file
Widgets/MapDisplay.cs which implements a subclass of SidebarPage which
shows the map widget. Now, when an image is selected, MapDisplay reads
its EXIF data and centres the map on it. This works fairly well, but the
code is still in a condition far from being published. :-)

Now what I'd like to have is a button below the map which says something
like "Apply filter" and that when clicked restricts the items in the
main view to only those which are located inside the map. But I guess
that reading the EXIF data on thousands of pictures might be too slow,
so I probably need to create a table in the DB which holds the latitude
and longitude of all the pictures.

And here's where I'm stuck. I'm not sure where I should start from...
I guess that the first step is to modify the PhotoStore and create a new
table to hold geolocation information. But how does data get written
there when importing pictures?
I guess a should edit Photo and PhotoChanges to hold the location
informations, and have a AddLocation() method to Photo which I would use
 from a new GeoTagImporter. But then data would be just in memory;
when/how does it get written to the DB?

TIA!
Ciao,
  Alberto

--
http://www.mardy.it <- geek in un lingua international!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]