Solved

How to georeference vector geometry using only two coordinate points?

  • 15 June 2021
  • 3 replies
  • 18 views

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.

icon

Best answer by senteria 15 June 2021, 17:34

View original

3 replies

Userlevel 4
Badge +26

Hmm, you can use this tool to define a custom coordinate system which can be then used in FME as normal: https://demos-safe-software.fmecloud.com/fmedatastreaming/Coordsys/Start.fmw

See here for more info: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Coordinate_Systems/Workbench/coordinate_sys_custom_about.htm

 

I'm not quite sure if this is what you're after though.

 

If you really need to create two extra points perhaps the Creator transformer is what you're looking for?

 

Perhaps I'm misunderstanding the question

Hmm, you can use this tool to define a custom coordinate system which can be then used in FME as normal: https://demos-safe-software.fmecloud.com/fmedatastreaming/Coordsys/Start.fmw

See here for more info: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Coordinate_Systems/Workbench/coordinate_sys_custom_about.htm

 

I'm not quite sure if this is what you're after though.

 

If you really need to create two extra points perhaps the Creator transformer is what you're looking for?

 

Perhaps I'm misunderstanding the question

Hmm, I think I need to be more clear about my phrasing. Thank you for your time regardless.

 

  1. I have GIS data which use a a coordinate system that starts with 0,0 in non-earth meters. The distance to the targeted projection is the same. i.e. 1 meter on the old GIS data is the same as the targeted projection. However it needs to rotate and move to i.e. 430,000/180,000 instead of 0,0. Through the rotate affinewarper I am able to do this as on the analogue drawing of which the non-earth GIS is based, does have two coordinates. I'm looking for a way to have FME find two more coordinates to warp.

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:

  1. Load in two points
  2. Create a line between these points using linebuilder transformer
  3. Use centerpointextractor transformer to get the coordinates for the middle of the line.
  4. Rotate the line 90 degrees with the rotator transformer using the central point coordinates from step 3 to rotate around the middle.
  5. Add the lines in step 2 and 4 to the chopper transformer
  6. Add a counter to give the 4 points a unique ID

 

Flow 2:

  1. Load in two points
  2. Create a line between these points using linebuilder transformer
  3. Use centerpointextractor transformer to get the coordinates for the middle of the line.
  4. Rotate the line 90 degrees with the rotator transformer using the central point coordinates from step 3 to rotate around the middle.
  5. Add the lines in step 2 and 4 to the chopper transformer
  6. Add a counter to give the 4 points a unique ID
  7. Use the attributemanager transformer to rename the values of the counter. 5=1, 6=2, 7=3, 8=4

 

B) Bring the flows together

 

  1. Use the featuremerger transformer to merge only the attributes to get four different coordinates.
  2. Use the vertex creator transformer and insert the local x/y coordinates to create points
  3. Use the vertex creator transformer again and insert the local x/y coordinates to create lines
  4. Sent the output to the affinewarper's 'control' input
  5. Load in the local GIS data to the observed.

 

C) Any after cleanup using geometry filter/attributemanager.

 

 

 

Reply