Skip to main content
Question

OCR extraction from poor-quality rasterised PDFs for GIS attribution

  • Oct 9, 2026 4:02 PM UTC
  • 2 replies
  • 53 views

galigis
Enthusiast
Forum|alt.badge.img+22

Hi All,

I’m exploring whether FME could help automate a manual process for extracting pipe diameter information from rasterised PDF drawings.

The PDFs also need be georeferenced, although the raster quality is relatively poor. The aim is to extract pipe diameter annotations using OCR, create point locations from the recognised text, and then spatially associate these with the corresponding GIS pipe lines to populate the diameter attribute.

I’ve tried TesseractCaller, but the results have not been sufficiently reliable so far.

Has anyone successfully implemented something similar in FME? I’d be particularly interested in recommendations for OCR libraries, Python libraries, FME packages, or other approaches that perform well with low-quality engineering drawings.

Below of an example of the pdf

 

Thanks :)

2 replies

itsmatt
Celebrity
Forum|alt.badge.img+48
  • Celebrity
  • Oct 13, 2026 2:39 AM UTC

In all honesty if it were me I’d ask Claude what it recommends (if you haven’t already) - if you can give it some sample data, let it know you want it in FME it should give you a pretty decent start. 

 


ctredinnick
Supporter
Forum|alt.badge.img+21
  • Supporter
  • Oct 13, 2026 4:11 AM UTC

Georeferencing is going to be the hardest or most manual step if that’s all the information you have to go off, so first of all consider if there’s anything else you could mark or label at that point to help this out.

Note that line colour is not entirely reliable because in the pdf it is covered by labels, project boundaries etc. And note diameters are nominal, a mix of internal/external d. You might be able to infer PE100 pipe material from that?

After georeferencing the image, 1 metre square buffer/clip out the image around a mid-section snip of each of your mains pipes which are more than ~10m long (ie start snip at 1 metre, end at 1 metre before end). The image in each of these buffer/clips should be some part blue and to be confident it contains a pipe, count the blue pixels, or see if they generalise to a straight line inside the buffer. Then for the each clipped images tesseract it or pass it to an image model with ollama to get the text in it (maybe prompting for text to be oriented with a blue line). Image models might handle rotated and low-res text better.

Very much depends entirely on georeferencing accuracy, and somewhat that your GIS pipe geometries match to the PDF to begin with. And you’ll need to fill in the gaps along the mains for those pipes between valves without a label in the pdf.