Reading historical maps with optical character recognition (OCR)

Historical maps are a valuable source of spatial information (including political and legal attributes) for historians, but making this information available for systematic analysis or comparison can be challenging. Georeferencing old maps in a GIS tool to match mapped places with modern geometries is often not the best course of action as mathematical projections may vary — or maps may not even be intended to show exact geographic relations. Like modern underground maps, many historic maps simply depict relations between places in an abstract sense. Relative positions, especially shared borders and infrastructures, are the features that matter, but projecting such maps onto a modern base map won’t help.

Another – and overall more promising – approach to analysing spatial data from old maps is to capture map labels as text and to geocode the place names from scratch, perhaps also paying attention to incertainties or changes of location over time.

Handwriting recognition (HWR) and optical character recognition (OCR) technologies to extract text from images or PDFs files are improving fast as more training data are made available by researchers worldwide. This is why reading maps as texts has become an interesting option for working with printed and hand-drawn maps of the past.

This blog post gives an insight into optical character recognition (OCR) tests I have performed on engraved early modern maps, using the browser-based OCR service “Transkribus Lite“. Transkribus also offers an expert client for download and desktop installation, which includes additional features but is more difficult to use. For beginners and those wishing to experiment before committing themselves to a particular workflow, Transkribus Lite is the ideal choice. Every new account holder gets 500 free transcription credits — more credits can be bought at a reasonable price, and the customer service is excellent. As part of the DigiKAR geohumanities project, we are using a group account inTranskribus for the automated transcription of biographic data. My former colleague Markus Müller has published a blog series that details his analysis of early modern printed sermons in Transkribus.

The source covered in this blog post is a double-sided map of “Upper Hesse” (“Hassia Superior”) by engraver and publisher Matthäus Merian, illustrating the 1646 volume Archiepiscopatuum Moguntinensis, Trevirensis, et Coloniensis. This map accompanied a narrative description of prominent places in the Archbishoprics of Mainz, Trier and Cologne. Extracting the place names of the different villages, towns, monasteries or castles shown on the map ought to permit a direct comparison between the map information and geographic data contained in the text. This might, for instance, retrieve additional spelling variants or help us locate lesser-known / extinct places that could not be geocoded using the Google and Geonames APIs.

In general, reading early modern maps with an optical character recognition tool has several advantages over manual transcription:

Map of “Hassia Superior”, 1646: example of automated layout recognition in Transkribus Lite (baseline), viewed in the layout editor [click to enlarge]

1) LAYOUT RECOGNITION

Thanks to the systematic (and adjustable) layout recognition carried out by the OCR tool, all map labels are captured and no content is “forgotten”. In Transkribus Lite, the automated baseline layout recognition tries to read all map labels from left to the right — approximating lines in a book. In the layout editor, these recognised text sections can be checked and corrected if necessary.

2) IMPROVED TRANSCRIPTION OF PLACE NAMES

Hard-to-read place names (especially if the original scans are blurred) can often be decyphered through a combination of machine learning and human intervention. Having an OCR starting point – even though imperfect – speeds up the transcription process, even more so if transcribing is left to student assistants and other less experienced collaborators.

3) DATA INTEROPERABILITY AND RE-USE

All place names transcribed can easily be exported in plain text or XML formats to be added to a database, or geocoded and mapped. Some OCR tools, including Transkribus Lite, also offer the possibility to tag data directly in the system, or to deploy cleaned data in the form of a digital edition. In this way, collected data are interoperable and available for reuse.

The challenges you will most likely encounter when reading maps with OCR are the following:

Map of “Hassia Superior” 1646: several place names read in one line (left) and delimiters used in transcription (right) [click to enlarge]

1. TEXT BLOCK / LINE RECOGNITION:

Detecting texts as lines means that more than one place name per line will be captured. This requires manually introducing a delimiter (e.g. “/”) to separate them after data export. Please ensure that your delimiter is unique and does not come up in other contexts. Full-stops, for instance, are often part of places’ names and thus not suitable for separating entries.

 

Map of “Hassia Superior” 1646: example of place name (“Camberg”) split by river [click to enlarge]

2. SPLIT LABELS IN THE ORIGINAL MAP:

Place names in (historic) maps may not always come as one string but be split up into several lines or divided by geographic features such as rivers. Such split placenames will likely result in OCR errors and must be manually corrected.

If this results in unwanted duplicates in your list of places, make sure to run a duplicate finder (available in EXCEL and Google Sheets) on the exported list before proceeding with geo-coding and mapping.

 

 

Map of “Hassia Superior” 1646: example of region / territory names spread out across the map image [click to enlarge]

If names for larger regions are spread across the map, you may want to insert the full name for each occurrence but use brackets to indicate which parts of the place name are “missing”. It depends on the exact type of data analysis or data visualisation you want to carry out of names of larger regions matter at all. In most cases, adding regions as attributes to individual villages, towns etc. seems more useful. This can either be done via an in-built tagging system (link the annotations tool in Transkribus), or added to a spreadsheet / database later on.

Map of “Hassia Superior” 1646: example of geometry misread as text [click to enlarge]

3. GEOMETRIES MISREAD AS TEXT

Geographic features such as point geometries for towns, mountains, forests and rivers may be misread as text and result in “odd” characters or empty lines in the transcription. While it is possible to remove such misinterpretations in the layout editor, it might take too much time and is not necessary for data analysis. Empty lines can easily be handled after data export.

Screenshot of transcription performance when reading maps with Transkribus Lite [click to enlarge]

When I first ingested my 1646 map into Transkribus Lite and used a public model for 18th-century print to read it, the result I got included a) correctly read places (see blue circle in screenshot), geometries misread as text (see red circles in screenshot), split labels (see yellow circle in screenshot), several names per lines (see purple circle in screenshot) and, last but not least, non-geographic text contained in the map (see fragment of Latin map title in orange circle).

Opening the editing function and correcting the transcription line by line, however, was convenient and did not take too long. In cases where I am still in doubt about the correct transcription, I put the whole place name in square brackets [] to make sure that student assistants or I would be coming back to them.

In most cases, the place names retrieved from the map are different from the modern place names, and our next step will be to match them a) to the place names mentioned in the narrative sections of the Topographia, and b) to possible modern place names via Google and Geonames. Collecting different spelling variants will ultimately help us to improve our named entity recognition in other text genres relating to early modern Germany. In due time, we will also make spatial data relating to the Holy Roman Modern Empire public.



Cite this blog post
Monika Barget (2022, February 1). Reading historical maps with optical character recognition (OCR). INSULAE. Retrieved March 4, 2024, from https://doi.org/10.58079/qd91

Monika Barget

Monika Barget is an assistant professor in History at Maastricht University and co-coordinator of the DigiKAR geohumanities project at IEG Mainz. Her research interests include spatial history, digital mapping, political history and media.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search OpenEdition Search

You will be redirected to OpenEdition Search