Batch import tags and coordinates from MDB

Started by kawaisunn, September 27, 2022, 07:00:34 PM

Previous topic - Next topic

kawaisunn

I have thousands of PDF files created from scans with no meaningful embedded metadata, but have a script to generate tags and records in an MDB with lat/lon coordinates. Is it possible to push file-embedded metadata from an MDB to the IMatch DB by filename?

Mario

#1
What's a MDB? Microsoft Access database?

PDF files support embedded XMP data, and IMatch does as well (read and write).
I would suggest you do this in two steps:

1. Export the data you want to use into a CSV text file (comma-separated values).
Export the fully-qualified file name in column 1:

filename;lat;lon
c:\images\book1.pdf;0.234242;0.042242
c:\images\book2.pdf;0.235242;0.044242

2. Use the powerful CSV Import feature in IMatch to import the data from the CSV into XMP GPS lat/lon, title, headline, description, keywords...whatever data you keep in your database.

For GPS, import into XMP::exif\GPSLatitude\GPSLatitude and XMP::exif\GPSLongitude\GPSLongitude
See Tags and Groups and Metadata Tag ShortCodes if you are new to IMatch. Let us know when you need more info.

When IMatch writes back the metadata, it produces a standard-compliant XMP record and embeds it into the PDF file.
This makes the data accessible for all other XMP-compliant applications, including Adobe products like Acrobat Reader.

IMatch will use the coordinates to locate the PDF files on the map, you can perform reverse geocoding, display the coordinates in File Windows, edit them in the Metadata Panel etc.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

I'm guessing here - but at work we often refer to MDB as a Maria Database... just another relational database and a variation of MYSQL..

Mario

The actual database system should make no difference, all databases can export "CSV files" in one way or the other.
This is the route I would go if this is a one-time operation.

If this is a continuous process, writing a PowerShell, Python or other script which pulls the data out of the database system and then uses the built-in IMWS in IMatch to store the data into XMP fields is very doable. See https://www.photools.com/dev-center/doc/imatch/ for information about how other applications and programming languages can access IMatch database contents.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook