B4J Question Read Geo-tag information from an image?

AHilton

Active Member
Licensed User
Longtime User
Be aware that there are lots of things to go wrong with trying to get Lat/Lon from images. Depending on your particular situation …

1) There are lots of places (such as custom EXIF meta tags) in the EXIF to put Lat/Lon. Standard libraries only check 1 or 2 places, at best. Just because a library or code doesn't find a Lat/Lon, doesn't mean it's not in there somewhere.

2) EXIF information can get stripped during some transmissions depending on where/how it's getting to where you can read it. Example, a picture sent from a phone through SMS can (but sometimes not, depending on image resizing or the whim of the cellular provider) get the EXIF data mangled or completely stripped off.

3) Some cameras don't put any Lat/Lon in the EXIF at all. Even when they say they do.

4) If a phone camera, GPS/Location has to be turned on. That's completely up to user control (= "good luck").

5) Sometimes there's bizarre GPS encoding going on by the camera to the EXIF data structure. It's not always as simple as just reading a decimal notation (or DMS) of a Latitude, for example.

Just a heads-up
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Just a heads-up
That's why I use a table to gather extra info to store GPS (lat/lon), file name, date/time, device id, etc..).
I am in complete control rather than relying on the whims of disparate manufactures and their implementations of (whatever).

Using Camera through Intent is a prime example (photo taken as portrait shows as landscape when viewed).

Use your coding skills to satisfy your desires / app needs - or suffer later when users of different devices state it doesn't work.
 
Upvote 0
Top