Last active
March 3, 2020 18:07
-
-
Save casajarm/11a648bd6e7082348218e8a78cb10f8e to your computer and use it in GitHub Desktop.
Extract GPS Coordinates from JPG stored as BLOB in Oracle Database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT extractvalue(value(exif), '//exifMetadata/GpsIfd/GPSLatitude' | |
, 'xmlns="http://xmlns.oracle.com/ord/meta/exif"') AS latitude | |
, extractvalue(value(exif), '//exifMetadata/GpsIfd/GPSLongitude' | |
, 'xmlns="http://xmlns.oracle.com/ord/meta/exif"') AS longitude | |
FROM photos | |
, TABLE((ordsys.ordimage.getmetadata(photo_image, 'EXIF'))) exif | |
WHERE photo_id = :ID /* optional filter */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment