I'm trying to convert some poorly formatted lat long coordiantes into correct ones. You can see the original and new format in this sample data. I'm sure this is pretty straight forward but I'm new to Safe FME and could use some help.
Hi @tmoreland, a possible way is to use some FME String functions to create new values. You can set these expressions to the "Attribute Value" column in the AttributeManager or the AttributeCreator.
New Longitude:
-@Substring(@Value(Origional Longitude),0,2).@Trim(@Substring(@Value(Origional Longitude),2),0)
New Latitude:
@Substring(@Value(Origional Latitude),0,2).@Trim(@Substring(@Value(Origional Latitude),2),0)
See here to learn more about FME String functions: String Functions
Hi @tmoreland, a possible way is to use some FME String functions to create new values. You can set these expressions to the "Attribute Value" column in the AttributeManager or the AttributeCreator.
New Longitude:
-@Substring(@Value(Origional Longitude),0,2).@Trim(@Substring(@Value(Origional Longitude),2),0)
New Latitude:
@Substring(@Value(Origional Latitude),0,2).@Trim(@Substring(@Value(Origional Latitude),2),0)
See here to learn more about FME String functions: String Functions
Hi @tmoreland, a possible way is to use some FME String functions to create new values. You can set these expressions to the "Attribute Value" column in the AttributeManager or the AttributeCreator.
New Longitude:
-@Substring(@Value(Origional Longitude),0,2).@Trim(@Substring(@Value(Origional Longitude),2),0)
New Latitude:
@Substring(@Value(Origional Latitude),0,2).@Trim(@Substring(@Value(Origional Latitude),2),0)
See here to learn more about FME String functions: String Functions
In your sample CSV data, however, the zeros have been removed as shown below. I therefore thought the zeros should be removed. The sample was wrong?
Origional Longitude,Origional Latitude,New Format Longitude,New Format Latitude
85056853,34992947,-85.56853,34.992947
85273136,34991196,-85.56853,34.991196
85273136,34991196,-85.56853,34.991196
85280427,35017689,-85.56853,35.17689
85273136,34991196,-85.56853,34.991196
85326172,35107351,-85.56853,35.107351
85330663,35088552,-85.56853,35.88552
85156949,35042868,-85.56853,35.42868
85156949,35042868,-85.56853,35.42868
85156949,35042868,-85.56853,35.42868
85211314,35013269,-85.56853,35.13269
85200594,35165607,-85.56853,35.165607
85257462,35015881,-85.56853,35.15881
85056649,35098115,-85.56853,35.98115
85056649,35098115,-85.56853,35.98115
85327874,35110546,-85.56853,35.110546
85134423,35112615,-85.56853,35.112615
85100611,35069722,-85.56853,35.69722
85383202,35018934,-85.56853,35.18934
85211326,35008570,-85.56853,35.857
85301228,35048436,-85.56853,35.48436
Hi @tmoreland, a possible way is to use some FME String functions to create new values. You can set these expressions to the "Attribute Value" column in the AttributeManager or the AttributeCreator.
New Longitude:
-@Substring(@Value(Origional Longitude),0,2).@Trim(@Substring(@Value(Origional Longitude),2),0)
New Latitude:
@Substring(@Value(Origional Latitude),0,2).@Trim(@Substring(@Value(Origional Latitude),2),0)
See here to learn more about FME String functions: String Functions
Hi @tmoreland, a possible way is to use some FME String functions to create new values. You can set these expressions to the "Attribute Value" column in the AttributeManager or the AttributeCreator.
New Longitude:
-@Substring(@Value(Origional Longitude),0,2).@Trim(@Substring(@Value(Origional Longitude),2),0)
New Latitude:
@Substring(@Value(Origional Latitude),0,2).@Trim(@Substring(@Value(Origional Latitude),2),0)
See here to learn more about FME String functions: String Functions
-@Substring(@Value(Origional Longitude),0,2).@Substring(@Value(Origional Longitude),2)
@Substring(@Value(Origional Latitude),0,2).@Substring(@Value(Origional Latitude),2)
Hi @tmoreland, a possible way is to use some FME String functions to create new values. You can set these expressions to the "Attribute Value" column in the AttributeManager or the AttributeCreator.
New Longitude:
-@Substring(@Value(Origional Longitude),0,2).@Trim(@Substring(@Value(Origional Longitude),2),0)
New Latitude:
@Substring(@Value(Origional Latitude),0,2).@Trim(@Substring(@Value(Origional Latitude),2),0)
See here to learn more about FME String functions: String Functions