Skip to main content

Hello guys,

I´m new to FME and would need some help with the following problem:

I want to create a gdb out of a dwg file. For this dwg a local coordinate system was used, but it is not set. Unfortunately, the only thing I´ve got is a sligthly complicated formula for a (similarity) tranformation to the underlying MGI (EPSG: 31256) including these paramaters: Offset dxdm], Offset dydm], Center of rotation x0xm], Center of rotation y0ym], Rotation angle erad]. Because Millimeters and the rotation center were used the formula for the new x´ and y´ looks like this:

x´= x0 + (x/1000-x0) * cos(-rad) - (y/1000-y0) * sin(-rad) + dx

y´= y0 + (x/1000-x0) * sin(-rad) - (y/1000-y0) * cos(-rad) + dy

First, I tried a combination of CoordinateExtractor, Offsetter and Rotator, what didn´t bring a perfect result regarding the coordinates. Besides I had to aggregate all the features to one because otherwise the Offsetter changed the pattern of the lines.

Then I tried the Affiner, but (thanks to my math skills) I couldn´t get the correct Parameters (A-F) out of the formula.

I also tried to create and set a new local coordinate system, but again I couldn´t find the rigth configuration. There is no option for a local projection and I´m not sure the parameters I´ve got are enough for creating a new coordinate system.

Is there maybe another possiblity or does some of you know what I should use for the Affiner or the LocalCoordinateSystemSetter? I appreciate any help.

Hi @ricmit,

If you have (or can calculate) four matching coordinates between EPSG:31256 and the local coordinate system, you can use the AffineWarper to move your data between the coordinate systems. You will need to create vector lines from the matching coordinates to control the transformer. For more information, please the the transformer documentation.

The calculated affine parameters will be list in the log once you have done the warping. These parameters can be used to create a custom coordinate system based on EPSG:31256, using the TMAF projection instead of TM. For more info, please see the projection documentation. You can then use the Reprojector instead of the AffineWarper, and can share the coordinate system definition with colleagues.

I would be happy to create the custom definition for you, if you can send me the log file from the AffineWarper.


Hi @ricmit,

If you have (or can calculate) four matching coordinates between EPSG:31256 and the local coordinate system, you can use the AffineWarper to move your data between the coordinate systems. You will need to create vector lines from the matching coordinates to control the transformer. For more information, please the the transformer documentation.

The calculated affine parameters will be list in the log once you have done the warping. These parameters can be used to create a custom coordinate system based on EPSG:31256, using the TMAF projection instead of TM. For more info, please see the projection documentation. You can then use the Reprojector instead of the AffineWarper, and can share the coordinate system definition with colleagues.

I would be happy to create the custom definition for you, if you can send me the log file from the AffineWarper.

Hallo @daveatsafe,

thank you for your answer. After calculating some matching coordinates the AffineWarper worked pretty good for me. I also used the parameters from the log (p0 to p5) to define the custome coordinate system. Unfortunately now the Reprojector afterwards is not working ("Invalid source coordinate system"), but I am not sure what could be wrong about the custom definition. Here are the 6 parameters if you want to try.

p0 = 0.9823693046225019, p1 = 0.18341239749415397, p2 = -210527.5261412544, p3 = -0.18328265664294124, p4 = 0.9831217877253629, p5 = 361053.39943802543


Hallo @daveatsafe,

thank you for your answer. After calculating some matching coordinates the AffineWarper worked pretty good for me. I also used the parameters from the log (p0 to p5) to define the custome coordinate system. Unfortunately now the Reprojector afterwards is not working ("Invalid source coordinate system"), but I am not sure what could be wrong about the custom definition. Here are the 6 parameters if you want to try.

p0 = 0.9823693046225019, p1 = 0.18341239749415397, p2 = -210527.5261412544, p3 = -0.18328265664294124, p4 = 0.9831217877253629, p5 = 361053.39943802543

Hi @ricmit,

Please unzip the attached file into your Documents\\FME folder. It contains the custom coordinate system using your affine parameters applied to EPSG:31256. I created it using the Define Custom Coordinate System web app.

ricmit.zip


Hi @ricmit,

Please unzip the attached file into your Documents\\FME folder. It contains the custom coordinate system using your affine parameters applied to EPSG:31256. I created it using the Define Custom Coordinate System web app.

ricmit.zip

Thank you for your help, unfortunately the Reprojector still doesn`t work ('Reproject: Could not reproject the geometry of the preceding feature: Reprojector: Invalid source coordinate system') after using the CoordinateSystemSetter to define the new Custom Coordinate System.


Thank you for your help, unfortunately the Reprojector still doesn`t work ('Reproject: Could not reproject the geometry of the preceding feature: Reprojector: Invalid source coordinate system') after using the CoordinateSystemSetter to define the new Custom Coordinate System.

Hi @ricmit,

Please check that your Documents\\FME\\CoordinateSystems folder contains the file CoordSys_20200413_151534.fme, and that the coordinate system 'ricmit_local' is available in the Coordinate System Gallery in FME Workbench - Tools.


Hi @ricmit,

Please check that your Documents\\FME\\CoordinateSystems folder contains the file CoordSys_20200413_151534.fme, and that the coordinate system 'ricmit_local' is available in the Coordinate System Gallery in FME Workbench - Tools.

I checked and it's in the folder and available in the Coordinate System Gallery. The CoordinateSystemSetter works fine for me, but the Reprojector afterwards still delivers the same error message. Right now I am working with the Data Interoperabiltity extension for ArcGIS Pro, maybe that could be an issue?


I checked and it's in the folder and available in the Coordinate System Gallery. The CoordinateSystemSetter works fine for me, but the Reprojector afterwards still delivers the same error message. Right now I am working with the Data Interoperabiltity extension for ArcGIS Pro, maybe that could be an issue?

Hi @ricmit,

Please try using the CsmapReprojector instead of the Reprojector and let me know if the problem continues.


Hi @ricmit,

Please try using the CsmapReprojector instead of the Reprojector and let me know if the problem continues.

Hallo @daveatsafe,

now with the CsmapReprojector it‘s working. I didn’t know there where other transformers for reprojecting than the standard one. Thank you again for your help!


Hallo @daveatsafe,

now with the CsmapReprojector it‘s working. I didn’t know there where other transformers for reprojecting than the standard one. Thank you again for your help!

Hi @ricmit,

In Data Interop, the Reprojector uses the Esri reprojection engine, but the new definition is for Csmap, so it isn't seen. The library specific reprojector transformers allow you to force the choice of reprojection engine.

We recently added the PROJReprojector, which uses the popular PROJ reprojection engine. This may prove to be the easiest to use in the future.


Reply