Situation: I have geometry in a local coördinate system and through the affineWarper and vertex creator I can transform it and move to the actual location in the coördinate system I prefer. The problem is that the affine warper needs 4 points and I only have two points of reference placed in an old analogue drawing. Is there a simple way using FME to create these extra two points for me? So far I've georeferenced the analogue drawing twice to get the coordinates I need. This is quite time consuming and I have a feeling there should be an easier way.
Solved
How to georeference vector geometry using only two coordinate points?
Best answer by senteria
I actually answered my own question. Through the use of multiple steps I managed to do it.
There are two identical flows. One for the local coordinates and one for the designated coordinates
A) Create two flows
Flow1:
- Load in two points
- Create a line between these points using linebuilder transformer
- Use centerpointextractor transformer to get the coordinates for the middle of the line.
- Rotate the line 90 degrees with the rotator transformer using the central point coordinates from step 3 to rotate around the middle.
- Add the lines in step 2 and 4 to the chopper transformer
- Add a counter to give the 4 points a unique ID
Flow 2:
- Load in two points
- Create a line between these points using linebuilder transformer
- Use centerpointextractor transformer to get the coordinates for the middle of the line.
- Rotate the line 90 degrees with the rotator transformer using the central point coordinates from step 3 to rotate around the middle.
- Add the lines in step 2 and 4 to the chopper transformer
- Add a counter to give the 4 points a unique ID
- Use the attributemanager transformer to rename the values of the counter. 5=1, 6=2, 7=3, 8=4
B) Bring the flows together
- Use the featuremerger transformer to merge only the attributes to get four different coordinates.
- Use the vertex creator transformer and insert the local x/y coordinates to create points
- Use the vertex creator transformer again and insert the local x/y coordinates to create lines
- Sent the output to the affinewarper's 'control' input
- Load in the local GIS data to the observed.
C) Any after cleanup using geometry filter/attributemanager.
Reply
Rich Text Editor, editor1
Editor toolbars
Press ALT 0 for help
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.