Skip to main content
Question

How to Georeference a PDF?


aron
Supporter
Forum|alt.badge.img+16
  • Supporter

Using two files: a PDF with no geodata, and a georeferenced polygon. They cover the exact same area (bounding box of PDF = polygon). The polygon and the PDF were originally created in the same coordinate system. There should be no need for "warping". Its just only the georeferenced coordinates in the PDF that are missing.

 

Q: How do I georeference the PDF using the polygon?

 

7 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

Multiple ways to do this, but one way is to use the AffineWarper. You need to generate from - to lines with two points based on the unreferenced bounding box and the georeferenced polygon, these are the control features. From these the transformation parameters will be calculated. Features entering the Observed port will be transformed with these parameters.


aron
Supporter
Forum|alt.badge.img+16
  • Author
  • Supporter
  • October 2, 2023
nielsgerrits wrote:

Multiple ways to do this, but one way is to use the AffineWarper. You need to generate from - to lines with two points based on the unreferenced bounding box and the georeferenced polygon, these are the control features. From these the transformation parameters will be calculated. Features entering the Observed port will be transformed with these parameters.

Thanks!

 

You mentioned multiple methods, which method is the quickest in your experience? The PDF-files in question are beasts.


virtualcitymatt
Celebrity
Forum|alt.badge.img+35

If it's just an offset which need to be applied you can use an Offsetter

 

You will need to know the difference between the x,y of the lower left corner of the bounding box and the lower left corner of the PDF.

 

the offsetter will shift the data by the provided x and y components.

 

If, however, your PDF has been scaled and/or rotated then you'll need to use an Affiner transformer - the Affiner transformer requires that you provide a TransformationMatrix e.g., https://en.wikipedia.org/wiki/Affine_transformation#Image_transformation

 

There might be an easier way but off the top of my head I can't think of anything


aron
Supporter
Forum|alt.badge.img+16
  • Author
  • Supporter
  • October 2, 2023

I forgot an important piece of info.

 

The polygon and the PDF files were originally created in the same coordinate system. There should be no need for "warping". Its only the georeferenced coordinates in the PDF that are missing.


nielsgerrits
VIP
Forum|alt.badge.img+54
aron wrote:

Thanks!

 

You mentioned multiple methods, which method is the quickest in your experience? The PDF-files in question are beasts.

If it is only scaled and moved you can use a Scaler and an Offsetter.


nielsgerrits
VIP
Forum|alt.badge.img+54

Attached sample workspace demonstrating the AffineWarper.

AffineWarperSample(2021)_result


aron
Supporter
Forum|alt.badge.img+16
  • Author
  • Supporter
  • April 10, 2024

In case it is of use to anyone else, I ended up scavenging what I needed from the excellent FME Hub transformer ‘BoundsFitter’.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings