FeatureWriter (instead of Writer) to write the ECW (version 2) file
ListExploder so that count and name are now attributes
AttributeCreator to concatenate _dataset and name to generate the name of the ecw file
PythonCaller
Where I am stuck is the Python to use to explicitly set the values of Datum and Projection in the header of the (version 2) ECW file
Hi @nicholas. I think you're on the correct path if you want to use Python. You can also try using a shutdown script to do post-process your ECW using Python. I wondering why the header isn't being populated with the coordinate system info with FME? Have you tried doing the following as daveatsafe suggested here using an EPSG number to define your coordinate system?
Right-click on the output ECW feature type and choose Properties:In the dialog that opens, set Use EPSG Code for Projection to Always:
If this isn't working, would you mind sharing a simplified workspace (if you Save As Template, you can package up you source data with your workspace as a .fmwt file) to help demonstrate what's happening?
Hi @nicholas if you want the EPSG code to be written out with the file, then you will need to use ECW Version 3 in the Writer parameters. Unfortunately, this setting is not available when using Version 2 in the Writer parameters. Additionally, even writing out with the writer set to Version 3, I can see that EPSG:7856 has not been verified to work with Erdas Products .
If you're looking to edit the ECW file manually, you could try reading the output ECW file in your workspace with the Text File Reader to read the file as raw text, and then use a StringReplacer to replace the EPSG:1168 string with EPSG:7856.