Hi @mlupien,
The AffineWarper transformer can help you out with the alignment. It will calculate an affine transformation (combination of offset, rotation and scale) to align the original DWG data with the Mapinfo base map. To use the transformer, please follow these steps:
Examine both datasets in the FME Data Inspector, and find at least four common points between the two datasets.
Enter the coordinates of these common points into Excel, or other spreadsheet app, with one point per row, in the order DWG_X, DWG_Y, Mapinfo_X, Mapinfo_Y. Save as a CSV file.
Create a new DWG to DWG workspace, with Dynamic Schema set in the Generate dialog. Set Explode Blocks to No in the Reader Parameters. Set the writer template file to be the source DWG file. This should produce a very simple workspace, with a single input and output feature type.
Add a CSV reader to the workspace, using the CSV file you created of the common points. Connect this to a VertexCreator to create a point form the DWG X and Y values. Add a second VertexCreator to add a point from the Mapinfo X and Y values. These will be your control vectors.
Connect the output from the second VertexCreator to the Control port of an Affine Warper. Connect the source DWG feature type to the Observed port, and the destination DWG feature type to the output Corrected port.
Hi @mlupien,
The AffineWarper transformer can help you out with the alignment. It will calculate an affine transformation (combination of offset, rotation and scale) to align the original DWG data with the Mapinfo base map. To use the transformer, please follow these steps:
Examine both datasets in the FME Data Inspector, and find at least four common points between the two datasets.
Enter the coordinates of these common points into Excel, or other spreadsheet app, with one point per row, in the order DWG_X, DWG_Y, Mapinfo_X, Mapinfo_Y. Save as a CSV file.
Create a new DWG to DWG workspace, with Dynamic Schema set in the Generate dialog. Set Explode Blocks to No in the Reader Parameters. Set the writer template file to be the source DWG file. This should produce a very simple workspace, with a single input and output feature type.
Add a CSV reader to the workspace, using the CSV file you created of the common points. Connect this to a VertexCreator to create a point form the DWG X and Y values. Add a second VertexCreator to add a point from the Mapinfo X and Y values. These will be your control vectors.
Connect the output from the second VertexCreator to the Control port of an Affine Warper. Connect the source DWG feature type to the Observed port, and the destination DWG feature type to the output Corrected port.

Wow @daveatsafe !! it is the closest I was able to get so far !!
both maps are now overlapping instead of being kilometers apart !
The only problem now is that It looks like I need a rotation of some sort.
Let me know if the way I took My 4 points is correct since I don't have any point geometries that are common, I used the FME Data Inspector option "Copy Ground coordinates" to build my CSV.
So I pin pointed 4 spots in the corners of both maps.
Here is my CSV and WorkBench. let me know what I am doing worng.
Thank you.
Mathieu.
VertexConverter_DWG_Mapinfo.csv
Align_sect_elect_sur_base_map.fmw
Wow @daveatsafe !! it is the closest I was able to get so far !!
both maps are now overlapping instead of being kilometers apart !
The only problem now is that It looks like I need a rotation of some sort.
Let me know if the way I took My 4 points is correct since I don't have any point geometries that are common, I used the FME Data Inspector option "Copy Ground coordinates" to build my CSV.
So I pin pointed 4 spots in the corners of both maps.
Here is my CSV and WorkBench. let me know what I am doing worng.
Thank you.
Mathieu.
VertexConverter_DWG_Mapinfo.csv
Align_sect_elect_sur_base_map.fmw
Hi @mlupien,
I have a workspace that tries to do a better job on the text and blocks:
m_
align-sect-elect-sur-base-map.fmw
However, it doesn't quite get it exactly right.
I think you might have better luck using this workspace to extract the adjustment parameters, then using them to Scale, Rotate and Move within AutoCAD itself:
getadjustments.fmwI suggest using the commands in the order Scale, Rotate, then Move. The base point for all three should be 0,0
Hi @mlupien,
The AffineWarper transformer can help you out with the alignment. It will calculate an affine transformation (combination of offset, rotation and scale) to align the original DWG data with the Mapinfo base map. To use the transformer, please follow these steps:
Examine both datasets in the FME Data Inspector, and find at least four common points between the two datasets.
Enter the coordinates of these common points into Excel, or other spreadsheet app, with one point per row, in the order DWG_X, DWG_Y, Mapinfo_X, Mapinfo_Y. Save as a CSV file.
Create a new DWG to DWG workspace, with Dynamic Schema set in the Generate dialog. Set Explode Blocks to No in the Reader Parameters. Set the writer template file to be the source DWG file. This should produce a very simple workspace, with a single input and output feature type.
Add a CSV reader to the workspace, using the CSV file you created of the common points. Connect this to a VertexCreator to create a point form the DWG X and Y values. Add a second VertexCreator to add a point from the Mapinfo X and Y values. These will be your control vectors.
Connect the output from the second VertexCreator to the Control port of an Affine Warper. Connect the source DWG feature type to the Observed port, and the destination DWG feature type to the output Corrected port.

Actually, your first suggestion works now !! I added a coordinate system of XY-M to my DWG reader and the drawing is almost perfectly alligned now !
