Question

How to make a field from a CVS spreadsheet brought in as a reader in a FME Script negative values for longitude values.


I am using the vertexcreator transformer to convert the Lat/long field values into points but the output puts the points in the wrong location. I noticed if I change the data within the spreadsheet so that the longitudinal values are negative (I live in Canada) then the same script works fine. Since I am getting this spreadsheet from a downloaded location I would preferred to have the FME script make the longitude field negative values for me instead of me fixing the spreadsheet before it is consumed into the FME script.

 


3 replies

Badge +10

Hi @henrywinkler​, of course there are a few routes, but one option is to use an attribute manager to create a corrected attribute with negative values. you would use the arithmetic editor and multiply the existing attribute by -1.

imageimageIf i've provided something helpful, please upvote the comment. If i've provided a solution, please mark it as 'Best Answer'. This helps the community find solutions when your question is referenced.

If I didn't provide a solution, please let me know if I can help further. Thanks! 🙂

Hi @henrywinkler​, of course there are a few routes, but one option is to use an attribute manager to create a corrected attribute with negative values. you would use the arithmetic editor and multiply the existing attribute by -1.

imageimageIf i've provided something helpful, please upvote the comment. If i've provided a solution, please mark it as 'Best Answer'. This helps the community find solutions when your question is referenced.

If I didn't provide a solution, please let me know if I can help further. Thanks! 🙂

using this Transformer and times the vales in the field by -1 , what would be the appropriate 'Action' ?

image

Badge +10

using this Transformer and times the vales in the field by -1 , what would be the appropriate 'Action' ?

image

I've always created a new attribute rather than overwriting the existing attribute when the logic contains the attribute i want to write to (as it does in this case). I'm not sure if this is necessary so might be worth testing out.

Regardless, you'll want to use the set value option.

--

If i've provided something helpful, please upvote the comment. If i've provided a solution, please mark it as 'Best Answer'. This helps the community find solutions when your question is referenced.

If I didn't provide a solution, please let me know if I can help further. Thanks! 🙂

Reply