Announcement

Collapse
No announcement yet.

Convert GPS data into location name

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Convert GPS data into location name

    Is there a way in ACDSee or some utility to read the gps information from a picture and then lookup the country, state/province, city and store it back into the photos metadata for use in future searches. I know how to do it photo by photo. I’m looking to process 1000s of photos
    thanks Dean

  • #2
    Originally posted by dwest4277 View Post
    Is there a way in ACDSee or some utility to read the gps information from a picture and then lookup the country, state/province, city and store it back into the photos metadata for use in future searches. I know how to do it photo by photo. I’m looking to process 1000s of photos
    thanks Dean
    In ACDSee Ultimate 2023, Reverse Geocode can only be applied to a group of images if they are all at the same location. ie it will write the same address into all of the selected images.

    Click image for larger version

Name:	Geocode.jpg
Views:	109
Size:	28.0 KB
ID:	63516
    I'm not currently aware of any of the shelf application that can handle this. Obtaining addresses from GPS co-ordinates would require linking to a service like Google maps. I did find this in relation to ExifTool

    In September 2022 Phil Harvey (author of ExifTool) said
    "I don't want to add anything to ExifTool that relies on an external service.

    StarGeek actually wrote a config file for ExifTool to do what you want via the Google Maps service, but then Google started charging for the service which made it so that StarGeek's code wasn't useful to the general public".​

    Comment


    • #3
      Hmm, shouldn't be to difficult. As "Pythoneer" here's what I'd try:

      pip install exiv2 geopy

      Write a script that does as follows:

      in a loop for every file
      read latitude and longitude from image meta data using exiv2 (see https://pypi.org/project/exiv2/)
      get additional location data from Nominatim (see https://geopy.readthedocs.io/en/stable/)
      write found data to IPTC meta data using exiv2

      Such a script could be invoked via external editors in AC. AC would present the results instantly an even add the new data to the DB.

      This could give a nice Saturday afternoon job, but it's Monday, and I haven't many images with gps coordinates . . .
      However, I tried it on CLI and it worked like a charm.


      BTW. Afaik Nominatim is using OSM (no google involved).
      Last edited by Emil; 01-09-2023, 06:11 AM.

      Comment


      • #4
        You might try geosetter (uses exiftool) : it can
        • get GPS coordinates from a GPX track file and a precise date/time (not needed in your case)
        • get location from GPS coordinates
        • store them in pictures

        Comment


        • #5
          Originally posted by brajaq View Post
          You might try geosetter (uses exiftool) : it can
          Is Geosetter still fuctional. AFAIK it used a Google maps api the worked in conjunction with Internet Explorer, but Google has ceased support for Internet Explore some time ago. The last release of Geosetter according to the web site was in October 2019, and judging by the posts showing on that site, the mapping function no longer works.

          Comment


          • #6
            Well, I sometimes use Geosetter (3.5.3, 2019) with a GPX track file (from my phone) to set GPS coordinates and reverse location (based on day/time). It works.

            Comment


            • #7
              Originally posted by Greyfox View Post




              In ACDSee Ultimate 2023, Reverse Geocode can only be applied to a group of images if they are all at the same location. ie it will write the same address into all of the selected images.



              Thank you Greyfox, I didn’t know what to call what I was wanting to do. Since you replied I have gone searching and came up with “Photo Mechanic”

              I downloaded a trial version but had some issues with my machine and it but their tech support staff helped me with it and I have been able to do a bit of testing.

              Photo Mechanic (PM)does exactly what I’m wanting to do… there are some issues coming up. PM takes the GPS info from the photo, goes to its own server using Open Street and coming back with location information (right down to a street address) PM then puts the info into IPTC section of the photo… except my photos are taken on an iPhone and many of them are HEIC… so when I go to Ultimate and try to see the data, Ultimate says that IPTC isn’t available on HEIC file type.

              If I reverse geocode a JPG and open it in Ultimate, I can open the IPTC section and see the information that PM put into the photo.

              So I’m not sure what to do:

              Convert all my HEIC photos to another format that support IPTC? Then reverse geocode in PM and bring into Ultimate?

              Then what format should I convert the HEIC into?

              Can IPTC data be brought into EXIF so I can just keep the HEIC format?




              One more thing, PC is a full program, not just a utility. It costs over $100 US.




              Any suggestions?




              Thanks so much

              Dean

              Comment


              • #8
                Originally posted by dwest4277 View Post
                ...So I’m not sure what to do:
                Convert all my HEIC photos to another format that support IPTC? Then reverse geocode in PM and bring into Ultimate?

                Then what format should I convert the HEIC into?
                As I understand it, HEIC has potentially two advantages over JPG, the first is that the compression is better, so the file size is lower for the same quality.
                The second it that the format supports color dept uf both 3x8 bit and 3x10 bit, where as JPG only supports 3x8 bit.

                On the negative side, HEIC is not so well supported, and AFAIK it doesn't support standard IPTC.metadata.
                Where the HEIC images are from iPhones, the color profile is Display P3, which is not one of the profiles recognized by ACDSee.
                In addition ACDSee cannot export in HEIC format (As is also the case with Affinity Photo)
                To add to this, all of the HEIC images I have from an iPhone 12 are only 8 bit.

                So if you are going to edit the images in ACDSee (or Affinity Photo), you will be exporting to another format.
                You could Batch export to to TIFF, but the file size would be substantially bigger.
                My preference would be to batch export to JPG with embedded color sRGB color profile and catalog those, and archive the HEIC source images..

                Comment


                • #9
                  Originally posted by dwest4277 View Post
                  ...Can IPTC data be brought into EXIF so I can just keep the HEIC format?
                  Dean, can you post a link to an HEIC image that has had reverse geocode information added from Photo Mechanic.
                  If you don't want to have it openly available, you could PM it to me.

                  One more thing, PC is a full program, not just a utility. It costs over $100 US.
                  Yep, Cost here in Australia at the moment is $AUD 199.08 for the standard version or $AUD 327.98 for the Pro Version

                  Comment


                  • #10
                    Originally posted by dwest4277 View Post
                    ...Can IPTC data be brought into EXIF so I can just keep the HEIC format?
                    When you do a Reverse GeoCode in Photo Mechanic using an HEIC image, the location details are written into the HEIC image in the XMP-iptcExt section, which currently ACDSee isn't able to show. But potentially I have a work around that might help.

                    In Photo Mechanic, in the Set GPS Coordinates dialog, I ticked the reverse Geocode box, then clicked on the 3 dots to the right of it.
                    I selected only the 5 icons in the "Location Taken area", then clicked on OK, clicked on Apply, then closed the dialog.

                    That wrote the following metadata into HIEC image
                    XMP-iptcExt:LocationCreatedSublocation (street address - example Strathfield Terrace)
                    XMP-iptcExt:LocationCreatedCity (City - example Largs North)
                    XMP-iptcExt:LocationCreatedProvinceState (State - example South Australia)
                    XMP-iptcExt:LocationCreatedCountryName (Country - example Australia)
                    XMP-iptcExt:LocationCreatedCountryCode (Country Code - example AUS)

                    The EXIF standard as far as I know does not have any tags that are specifically designed to hold this information, but using EXIFTool, I was able to copy the above tags into the exifIFD User Comment tag, with each part of the "address" separated by a comma, resulting in the above example showning in the User Comment as
                    "Strathfield Terrace,Largs North,South Australia, Australia, AUS".

                    The basic Exiftool command I used (run from a .bat file because I wouldn't want to type it in very often) was
                    ExifTool "-exifIFD:UserComment<$XMP-iptcExt:LocationCreatedSubLocation, $XMP-iptcExt:LocationCreatedCity, $XMP-iptcExt:LocationCreatedProvinceState,$XMP-iptcExt:LocationCreatedCountryName,$XMP-iptcExt:LocationCreatedCountryCode" -overwrite_original *.HEIC

                    ACDSee automatically reads the EXIF User Comment from the HEIC file, and it can seen in Properties, Metadata, All Exif, and can be used in the Advanced Search in U2023.

                    Initially I copied it to (XMP-acdsee:Notes) within the HEIC image, because the ACDSee Notes are more easily viewed in the default metadata view, but then found that ACDSee doesn't read the XMP-acdsee metadata from HEIC images, because it expects any ACDSee metadata to be in an xmp sidecar file for that format, and it became necessary to use a further ExifTool step to copy the xmp-acdsee Notes into an existing ACDSee xmp sidecar file, and whilst it was able to be done it is a bit messy.

                    You can have the EXIF User Comment shown on the thumbnails though.

                    Interesting exercise, and it gave me a look at Photo Mechanic.

                    Comment


                    • #11
                      Originally posted by Greyfox View Post

                      Initially I copied it to (XMP-acdsee:Notes) within the HEIC image, because the ACDSee Notes are more easily viewed in the default metadata view, but then found that ACDSee doesn't read the XMP-acdsee metadata from HEIC images, because it expects any ACDSee metadata to be in an xmp sidecar file for that format, and it became necessary to use a further ExifTool step to copy the xmp-acdsee Notes into an existing ACDSee xmp sidecar file, and whilst it was able to be done it is a bit messy.

                      You can have the EXIF User Comment shown on the thumbnails though.

                      Interesting exercise, and it gave me a look at Photo Mechanic.

                      Greyfox...

                      Thankyou for all the time and effort you put into this!! Please accept my apologizes for not replying sooner and saving you from having to work with PC, though as you said, you got to give it a go. I have been having some laptop issues and hadn't been on for a bit.
                      With that said, that's a brilliant solution. I had a similar idea of using EXIFtool to move the data but being new, I wasn't sure where to stick it

                      A week ago today I attended a ACDSee workshop and had a quick "chat" with Adam and ended up sending him an email on this, and today I heard back from him... here is a bit of his reply

                      I love his first message
                      Hi Dean,

                      I'm going to ask around with our developers. This one is above my paygrade.
                      Suggestions from Dan (developer)

                      If he wants to do this right away I think he would have to convert all his HEIC to JPEG and then reverse geocode in photo mechanic.
                      We have it on our list this year to add IPTC support to HEIC via XMP sidecar files, not sure if we will have time but we are thinking about it.
                      Reverse geo lookup we have investigated adding multiple times but the services that do the lookup cost money per transaction so we have never committed to putting it into our application.
                      So as it goes for the foreseeable future, reverse geocoding will have to be done with PC or some other solution (if there is one). And hopefully in the next version of Ultimate (2024??) using your very appreciated exiftool solution wont be needed.
                      Thank you again
                      ​​​​​​​Dean

                      Comment


                      • #12
                        dwest4277

                        Thanks for the update.

                        In my playing around with PM, I did run into a number of cases where the reverse Geocoded "City" was not correct, where as the one given by Google matched the official place name. I did find posts on Camera Bits Forum regarding the same issue with "City"

                        Dan's comment "We have it on our list this year to add IPTC support to HEIC via XMP sidecar files" is interesting. I would prefer to see ACDSee get the ability to read and write the newer XMP-iptcExt extensions into formats that directly support them, but that would also mean that ACDSee would have to be able to write to those formats.

                        Comment


                        • #13
                          Greyfox I guess that wrong city issue is one of the pitfalls of hosting your own server that doesn't have the resources that something like google does. From what I read, PC uses OSM (open street map) as a base for their system.

                          StarGeek actually wrote a config file for ExifTool to do what you want via the Google Maps service, but then Google started charging for the service which made it so that StarGeek's code wasn't useful to the general public".​
                          Any idea where to get this config tool you spoke of near the top of this discussion?
                          It might end up at the end of the day to use that script and pay google to be a better cheaper option this way will likely have most accurate data and I am guessing that for the cost of PC, that the Google fee could be a bunch less (even for my 60K + photos)

                          EDIT: Went to google and I think I found what is required. its $5US per 1000 lookups per month (plus Im sure other misc fees and charges) so if I really do have 60,000 photos that have GPS info, then the Google fee will be $300 minimum. with PC being $140US (or something like that), as long as the City error isn't too rampant, it is financially the way to go!!
                          Last edited by dwest4277; 01-21-2023, 02:15 PM.

                          Comment

                          Working...
                          X