Skip to main content

I am using an AffineWarper to translate some co-ordinates based on a series of control points.

 

My control points are stored in a CSV file containing the following columns: Start_X, Start_Y, End_X, End_Y

 

These are a series of control points representing start and end locations for the transformation. These are turned into vectors which are the vectors for the AffineWarper to perform it's transformation (see screenshot).

 

This works fine on desktop FME, but when I upload the workspace to FME Server and upload the same CSV file, I do not get any features written.

 

I get a warning in the logs saying the AffineWarper requires a minimum of 4 points, when the file does have at least 4 lines.

 

I have written the outputs of the PointAdder and I can see the 4 vector lines being correctly created. However, it doesn't seem to be getting passed into the AffineWarper?

 

 

Hi @joe.cusdin​ ,

This result is what would happen if the CSV file was not being read.

 

Is the CSV file being uploaded with the workspace, or are you setting a parameter for its location?

 

Is the CSV feature type named 'CSV' or the base name of the file?


@daveatsafe​ thanks for the reply.

 

I am uploading the CSV file when I run the workspace. I'm also uploading another file (an AutoCAD file).

 

The strange thing is I can see the file is being read. I added a logger (attached) between the PointAdder and AffineWarper and can see it has picked up the features from the CSV. I also added a writer after the PointAdder and it does write 4 vector features. As a result, it appears the CSV file is being read. However, the AffineWarper doesn't seem to pick up the vectors.

 

I also ran the exact same workspace on desktop FME and attached the same log.

 

 


@daveatsafe​ thanks for the reply.

 

I am uploading the CSV file when I run the workspace. I'm also uploading another file (an AutoCAD file).

 

The strange thing is I can see the file is being read. I added a logger (attached) between the PointAdder and AffineWarper and can see it has picked up the features from the CSV. I also added a writer after the PointAdder and it does write 4 vector features. As a result, it appears the CSV file is being read. However, the AffineWarper doesn't seem to pick up the vectors.

 

I also ran the exact same workspace on desktop FME and attached the same log.

 

 

Hi @joe.cusdin​ ,

Thank you for the log file. I can see that the control vectors are being produced, but seem to be ignored by the AffineWarper. I did notice that the control vectors have three vertices instead of two, with the first being duplicated. This may be the source of the problem. Please use a GeometryValidator to remove the duplicate points and see if that fixes the problem.


Hi @daveatsafe​ 

Thanks very much for this. I have since updated my FME Desktop version to 2021 so it is the same as FME Server. I was able to replicate the same result.

 

I then added a GeometryValidator as you suggested which did fix it (see attached). However, this feels like it's not resolving the underlying issue and creates an extra (perhaps unnecessary step) in my process. I am wondering how I am incorrectly creating the vertices using my method, which was working in FME 2020?

 

The CSV contains 4 columns with Start_X, End_Y, End_X, End_Y which represent the start and ends of each vertices for the AffineWarper.


Hi @daveatsafe​ 

Thanks very much for this. I have since updated my FME Desktop version to 2021 so it is the same as FME Server. I was able to replicate the same result.

 

I then added a GeometryValidator as you suggested which did fix it (see attached). However, this feels like it's not resolving the underlying issue and creates an extra (perhaps unnecessary step) in my process. I am wondering how I am incorrectly creating the vertices using my method, which was working in FME 2020?

 

The CSV contains 4 columns with Start_X, End_Y, End_X, End_Y which represent the start and ends of each vertices for the AffineWarper.

Hi @joe.cusdin​ ,

Please also connect the Passed output from the GeometryValidator to the AffineWarper Control input.


Hi @daveatsafe​ 

Thanks very much for this. I have since updated my FME Desktop version to 2021 so it is the same as FME Server. I was able to replicate the same result.

 

I then added a GeometryValidator as you suggested which did fix it (see attached). However, this feels like it's not resolving the underlying issue and creates an extra (perhaps unnecessary step) in my process. I am wondering how I am incorrectly creating the vertices using my method, which was working in FME 2020?

 

The CSV contains 4 columns with Start_X, End_Y, End_X, End_Y which represent the start and ends of each vertices for the AffineWarper.

Hi @joe.cusdin​ ,

When adding a CSV file reader to the workspace, it is possible to set the input attribute automatically to be the x and y coordinates. If this happens, then you use VertexCreators to add x and y coordinates, you will get duplicate start coordinates.

To avoid this, I recommend alway setting the first VertexCreator Mode to Replace with Point, then set the second VertexCreator Mode to Add Point. Then you can remove the GeometryValidator.


Reply