Sunday, March 20, 2011

How to set geographical coordinates on pictures for Google Android ?

Hi,

I'm currently developping an application to manage my pictures on an Android phone. I developped an algorithm to classify the pictures based on the geographical coordinates (latitude, longitude) of each photo.

To test my application on the android emulator in Eclipse, I manually imported a bunch of photos from my computer to the SDCard folder of the emulator.

Now I would like to add manually lattitude and longitude data to each photo, so that I can test my algorithm. I've been searching a lot but could't find any way to go through it..

Can anybody help me on this ?

Thanks in advance.

From stackoverflow
  • are you just asking how to set EXIF location data on images from the desktop? There's plenty of image editors that will let you do that (Google it). Or are you asking how to tell Android to retrieve that data from images that already have EXIF location data?

    It sounds like you have the Android side of that worked out, you just want to dump GPS data into a set of images before putting them onto the phone. Here's a discussion on some desktop command-line tools you can use for that.

    Clem : Actually, you're right, and maybe my post wasn't very clear, I apologize .. - I have the code snippet to get geographical data from pictures stored in Android gallery ! - And I thought that those location data were not stored in EXIF metadata when you take a picture directly with the android phone but in some kind of an attached database specific to the emulator .... but apparently not ... So, if I add location (latitude and longitude data) directly to the picture before sending it to the emulator, it will work fine ?
    Yoni Samlan : Give it a shot. It probably does cache that stuff in a DB somewhere, but I would think it recreates that database when it rebuilds the rest of the media library (e.g. when it detects new files on the SD card). But I could be terribly wrong about that :)
    Clem : Ok, I'm going to try and report back here later, thanks !
    Clem : I used Picassa, combined with GoogleEarth to geotag the photos and then imported the whole album into the emulator. Works Fine ! Thank you

0 comments:

Post a Comment