Can we set GeoLocation for Picture after taking it?

I have a requirement to Take a picture from Ricoh camera and need to set lat/lng by accessing the picture again.
Can this be done?
I am seeing setOptions to set geoLocation, that is to set the options to camera not the pitcure.

Yes Examble : Google Picasa can do this, move and correct the placemark or sett a new marker on the map and the info are written to the image file automatically.

1 Like

See this:


GPS Altitude                    : 36 m Above Sea Level
GPS Date/Time                   : 2016:10:23 19:25:31Z
GPS Latitude                    : 37 deg 25' 58.58" N
GPS Longitude                   : 122 deg 10' 14.32" W
GPS Position                    : 37 deg 25' 58.58" N, 122 deg 10' 14.32" W

Iā€™m assuming that the API adds the GPS information to a metatag. You can test it on an image and then read the exif data

See the post below for working examples.

1 Like

Full code example:

JSON_GPS_SET_REQ=$(< <(cat <<EOF
  "name": "camera.setOptions",
  "parameters": {
    "sessionId": "SID_${SID}",
    "options": {
                  "gpsInfo": {
                 "lat": ${GPS_LAT},
                 "lng": ${GPS_LON},
                 "_altitude": ${GPS_ALT},
                 "_dateTimeZone":"${GPS_DATE} ${GPS_TIME}+00:00",
                   # Set the gps values on the camera via wifi
                echo ${JSON_GPS_SET_REQ}
                   curl -s -X POST -d "${JSON_GPS_SET_REQ}" http://${CAMIP}:${PORT}/osc/commands/execute >> /dev/null
            # Set the gps via usb
            ptpcam --set-property=0xD801 --val="${GPS_LAT},${GPS_LON},${GPS_ALT}m@${GPS_DATE}${GPS_TIME}Z,WGS84"

          echo "GPS enabled but now location found."

from community member 200cm3

- (void)setGpsLocation:(double)lat lng:(double)lng alt:(double) alt
 [self setOptions:@{@"gpsInfo":
                           @{@"lat": [NSNumber numberWithDouble: lat],
                             @"lng": [NSNumber numberWithDouble: lng],
                             @"dateTimeZone": @"2014:05:18 01:04:29+08:00",
                             @"_altitude": [NSNumber numberWithDouble:alt],
                             @"datum": @"\"WGS84\""}}];
1 Like

Since you want to add geoLocation to an image that you have already taken you can easily modify the metadata of that image with ExifTool to add that data. You should be able to do groups of images at one time if you are applying the same data to all of them.


Here is an example of Geotagging using ExifTool