Exploded diagram of a geological map sheet split into layers: a transparent knowledge layer of drill holes and mineral occurrences floating above the coloured map crop, with the legend and the title block pulled out below it
From one map sheet to separate, usable layers

TL;DR

  • Geological maps are hard inputs for vision-language models, and not only because of their size. A sheet’s legend, cross-section, correlation diagram, graticule and projection notes all refer to one another, so a simple question like “what’s the dominant lithology in this quadrant” needs several steps of reasoning.
  • Tiling or downsampling fixes the size problem but worsens the other one, because it can separate a polygon from the legend entry it needs.
  • Stratigraphic Amenity repackages Microsoft’s PEACE into a small Python SDK and a local MCP server for layout and legend detection, georeferencing, knowledge retrieval and overlays. It stops short of OCR, model inference and answer construction, so you bring your own agent and harness.

Key Takeaways

  • Break geological map processing into primitives, not one end-to-end system. Separate operations let other builders reuse the map-reasoning work without inheriting a fixed agent design.
  • Leaving out OCR and answer construction is a scope decision. “Bring your own agent and harness” keeps the toolkit usable with whichever model and workflow a team already has.

This post introduces our open-source toolkit for geological map processing, and links to the deeper write-ups on each part of it.

Why geological maps are hard for AI

Geological maps are awkward inputs for VLMs (circa Fable), and the sheer scale and resolution of these maps is only the beginning of the problem.

A typical map sheet is a large raster containing the map, legend, cross section, correlation of map units diagram, graticule, projection notes, and other marginalia. These components are individually readable, but they are mutually referential: a polygon depends on its legend entry, the legend depends on stratigraphic ordering, and geographic interpretations depend on the map frame and CRS.

Tiling or downsampling can fix the scale problem but exacerbates compositional ones. So a geological question like “what is the dominant lithology in this quadrant” can require multiple steps and operations for an AI assistant to cook up an answer, at varying levels of accuracy.

Existing work: vectorisation and PEACE

There is already substantial work on geological-map digitalization: AI4CMA and DIGMAPPER treat it primarily as a problem of vectorizing these maps. (And us too, we also have our own tools for vectorizing these maps.)

PEACE, meanwhile, takes an MLLM approach: their GeoMap-Agent decomposes map QA into information extraction, domain-knowledge integration, and answer generation. They also released GeoMap-Bench: 124 maps and 3,864 geologist-reviewed QA pairs, upon which their agent scored 0.811 vs GPT-4o’s 0.369.

However, their repo is currently packaged as an end-to-end QA tool and benchmark. We were looking for something more modular.

Geological map processing with Stratigraphic Amenity

Hence, Stratigraphic Amenity: PEACE repackaged into a small Python SDK and a local MCP server exposing operations for map layout and legend detection, georeferencing, knowledge retrieval, and overlays. Each operation is a separate tool an agent can call.

Map layout and legend detection

A YOLOv10 detector trained by the PEACE project finds the parts of a map sheet: the title, main map, legend, scale, index map, cross-sections and stratigraphic column. For geological map legend extraction, a second detector finds the colour swatches and text blocks inside the legend, and a geometric rule pairs them. There is no OCR, so the toolkit returns each legend label as not extracted rather than guessing at its text.

Georeferencing

A scanned sheet is only a picture until its pixels are tied to real coordinates. The toolkit fits an affine transform from ground control points read off the map frame, then reprojects to longitude and latitude. When georeferencing scanned maps, a leave-one-out check catches a single misread coordinate that a plain least-squares fit would hide.

Knowledge retrieval and overlays

Once the map is located, the toolkit queries external data for the mapped area, such as earthquake history, active faults and mineral occurrences, across ten knowledge providers. It then renders the results as an overlay on the map.

A local MCP server for agents

All of these operations are exposed through a local MCP server, so any agent that speaks the Model Context Protocol can call them. Testing with real agents changed our MCP tool design: how the tools report results and errors.

What it deliberately leaves out

It deliberately stops short of doing OCR, specifying VLM inference, or answer construction. Reading legend text, choosing a model and composing the final answer stay with the caller. Bring your own agent and harness.