Presagis OpenFlight Writer Parameters
Format
If specified, a master file will be created at the end of the writing process. The master file will contain references to the OpenFlight files that have been written out for each feature type during the translation.
The OpenFlight format version by default is 16.1 and can optionally be changed to 15.7 or 15.8.
Textures
The folder to write texture files referenced by the OpenFlight .flt files. The texture output folder is generally a subfolder of the output dataset but can be any path relative to the output dataset.
All textures image files for the dataset being produced will be written to this folder. Textured appearances that are shared between feature types of the same dataset will produce OpenFlight materials in different flt files that share the same texture image file. Texture file names are based on the fme appearance name. Existing old files of the same name from another run or another dataset will be overwritten with new files of the same name.
Specifies the preferred format for associated texture files. This preference will be used as long as the specified format supports the properties of the texture raster; if not, it will be overridden.
Possible values are:
- Auto (default) – The writer chooses the best representation based on the incoming texture raster.
- PNG
- JPEG
- GIF
- BMP
- SGI
- TIFF
If the preferred format is ignored, a message is added to the log file. Possible reasons that the preference will be ignored include a lack of raster palette support, alpha channel support, or color depth support in the selected format.
This parameter determines which texture coordinates will be used when a geometry surface with the same texture on the back and front sides is written. This is because the format supports only one texture.
- Use Front Presentation – Front texture coordinates are written, and back coordinates are ignored.
- Use Back Presentation – Back texture coordinates are written, and front coordinates are ignored.
- Split Surface – Both texture coordinates are output; however, this is done by splitting the surface and outputting two different geodes with the same vertex pool. Use caution when selecting this parameter because it produces very large files.
Optimization
By default the OpenFlight writer processes all geometry into triangles and creates an flt polygon structure for each triangle.
If this parameter is set to Yes, the writer will attempt to combine adjacent state sharing triangles into triangle strips and store them in flt mesh structures. This optimization can significantly compress geometry to save space and reduce load time.
Repair Missing Vertex Normals
By default, the OpenFlight writer will automatically add normals to any surface that does not already have them.
If the option is set to No, surfaces may not be shaded properly.
Spatial
Coordinate systems may be extracted from input feature data sources, may come predefined with FME, or may be user-defined. FME allows different output and input coordinate systems, and performs the required coordinate conversions when necessary.
If a coordinate system is specified in both the source format and the workspace, the coordinate system in the workspace is used. The coordinate system specified in the source format is not used, and a warning is logged. If a source coordinate system is not specified in the workspace and the format or system does not store coordinate system information, then the coordinate system is not set for the features that are read.
If a destination coordinate system is set and the feature has been tagged with a coordinate system, then a coordinate system conversion is performed to put the feature into the destination system. This happens right before the feature enters into the writer.
If the destination coordinate system was not set, then the features are written out in their original coordinate system.
If a destination coordinate system is set, but the source coordinate system was not specified in the workspace or stored in the source format, then no conversion is performed. The features are simply tagged with the output system name before being written to the output dataset.
For systems that know their coordinate system, the Coordinate System field will display Read from Source and FME will read the coordinate system from the source dataset. For most other input sources, the field will display Unknown (which simply means that FME will use default values). In most cases, the default value is all you'll need to perform the translation.
You can always choose to override the defaults and choose a new coordinate system. Select More Coordinate Systems from the drop-down menu to open the Coordinate System Gallery.
Changing a Reprojection
To perform a reprojection, FME typically uses the CS-MAP reprojection engine, which includes definitions for thousands of coordinate systems, with a large variety of projections, datums, ellipsoids, and units. However, GIS applications have slightly different algorithms for reprojecting data between different coordinate systems. To ensure that the data FME writes matches exactly to your existing data, you can use the reprojection engine from a different application.
To change the reprojection engine, Select Workspace Parameters > Spatial > Reprojection Engine. In the example shown, you can select Esri (but the selection here depends on your installed applications):
- The coordinate systems file coordsys.db in the FME installation folder contains the names and descriptions of all predefined coordinate systems.
- Some users may wish to use coordinate systems that do not ship with FME, and in those cases, FME also supports custom coordinate systems.
- Learn more about Working with Coordinate Systems in FME.
Note that the options described below are not available in all formats.
- Yes – Coordinates of all the points in the written features will be normalized to the interval [-0.5, 0.5] on the largest side of their XYZ-bounding cube. The other dimensions will be scaled proportionally. Additionally, the transformation matrix required to scale the model back to world coordinates will be written to a companion .fwt file. This can be used to improve precision of the written coordinates. The companion .fwt file will have the same name as the primary data file and will be written in the same folder. For folder-based formats, the file global.fwt will be written instead.
- No – The original coordinates will be written as provided. Coordinates will not be projected; .fwt world and .prj files will not be generated.
- Create Projection File Only – A companion .prj file containing the coordinate system and having the same name as the primary data file will be written in the same folder. For folder-based formats, the file global.prj will be written instead. Coordinates will not be projected and a world file will not be generated.
- Transform Coordinates Only – Transforms the coordinates as in the Yes option, but companion .prj and .fwt world files will not be generated.