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.
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.
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
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.
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.
Attached sample workspace demonstrating the AffineWarper.
In case it is of use to anyone else, I ended up scavenging what I needed from the excellent FME Hub transformer ‘BoundsFitter’.