Skip to main content

I have a feature class which already possesses a defined CRS. I am creating some polygon outlines from an Arc ASCII file and writing them to the feature class mentioned above. Also, i am reading a tiff image which contains the CRS information to be assigned to the feature class after the outlines have been loaded. So the goal now is to extract the CRS information from the tiff image(done) and assign it to the feature class to which the polygons are being written. How do we achieve it ? I am confused between the Reprojector and the Co-ordinateSystemSetter or is there any other way ?

Hi @abhinav4972,

I'm sorry, but FME cannot modify an existing feature class. However, it can reproject the source data into the same CRS before writing. Please add a Reprojector to reproject the data into the destination CRS.

The CoordinateSystemSetter will just change the coordinate system on the features, without reprojecting, and should only be used if the source data has a missing or incorrect CRS.


Hi @abhinav4972,

I'm not sure I fully understand what you're trying to achieve, however, hopefully I be of help here.

Firstly I'll explain the difference between the Reprojector and the CoordinateSystemSetter. For the Reprojector to work a known input Coordinate System is needed. For some formats (e.g., CAD) the coordinates themselves will have some x and y values, however, the coordinate system is unknown. This is where the CoordinateSystemSetter comes in handy. All it does it create the coordinate system flag so that FME knows what it is and can use it - No changes to the coordinates (x and y) take place.

 

 

I'm guessing the TIFF and the ASCII are in the same coordinate system, however, while the ASCII grid is projected (has proper x y's) it has an unknown coordinate system. You want to extract the coordinate system from the TIFF and add it to the polygons?

 

One option is to use a VariableSetter and VariableRetriever combination (attached), however, will only work for one Tiff at a time (perhaps that's all you need). Another option is to check out the FeatureMerger transformer out (this is similar to a join and requites a common attribute).

 

variablesetterexample.fmw

Hi @abhinav4972,

I'm not sure I fully understand what you're trying to achieve, however, hopefully I be of help here.

Firstly I'll explain the difference between the Reprojector and the CoordinateSystemSetter. For the Reprojector to work a known input Coordinate System is needed. For some formats (e.g., CAD) the coordinates themselves will have some x and y values, however, the coordinate system is unknown. This is where the CoordinateSystemSetter comes in handy. All it does it create the coordinate system flag so that FME knows what it is and can use it - No changes to the coordinates (x and y) take place.

 

 

I'm guessing the TIFF and the ASCII are in the same coordinate system, however, while the ASCII grid is projected (has proper x y's) it has an unknown coordinate system. You want to extract the coordinate system from the TIFF and add it to the polygons?

 

One option is to use a VariableSetter and VariableRetriever combination (attached), however, will only work for one Tiff at a time (perhaps that's all you need). Another option is to check out the FeatureMerger transformer out (this is similar to a join and requites a common attribute).

 

variablesetterexample.fmw
The TIFF and ASCII are in different CRS but the reader ESRI ASCII Grid (reading the ASCII File) doesn't support reading the spatial information, hence it is not picking up the CRS. So i am trying to assign it through a TIFF image. I tried the Variable Setter and Retriever but that is actually storing the CRS inside an attribute in the feature class. I wish to assign the CRS stored inside the tiff image to the feature class and not just an attribute. By the way, for the extra info, the feature class already contains a valid CRS but requires the CRS to be updated with CRS from tiff image. Also , i am reading multiple ASCII grids using the reader but the CRS for each Arc ASCII grid is same which can be retrieved from the tiff file.

Hi @abhinav4972,

I'm sorry, but FME cannot modify an existing feature class. However, it can reproject the source data into the same CRS before writing. Please add a Reprojector to reproject the data into the destination CRS.

The CoordinateSystemSetter will just change the coordinate system on the features, without reprojecting, and should only be used if the source data has a missing or incorrect CRS.

Actually the ARC ASCII Grid file being read has a valid CRS but the reader ESRI ASCII Grid being used is incapable to read the spatial information. Hence the CRS is not being read. Also, i would like to tell you that the feature class which will be assigned the CRS from the tiff image already has an valid CRS

 

 


Reply