Managing Feature Types
The Import Feature Types function adds feature types to an existing dataset by importing the schema from any dataset. This second dataset could be the same one as is being read, but this isn’t necessary; in fact, it doesn’t even need to be in the same format – the schema definition is the important part, and FME can read that from any format.
- From the Readers or Writers menu, select Import Feature Types. If you have more than one reader, you will be prompted to select the dataset to which you want the schema added.
- From the Import Feature Types dialog, specify the format and dataset (and parameters and coordinate system, if applicable) and click OK.
The log will display processing information and the feature types will be added to the selected dataset.
You can also choose to import feature types from a selected format in an entire folder by clicking the Advanced Browser button.
To output certain attributes or results to a different output layer, you can create new feature types for writer datasets.
- From the Writers menu, choose Add Feature Type.
- When the Feature Type dialog appears, rename the feature type.
- To attach attributes to the new feature, click the User Attributes tab.
To quickly copy feature types to a writer, right-click on a feature type, select Duplicate on Writer, and specify the writer on which to copy features.
Removing Feature Types
To remove selected feature types, choose Remove Feature Types from the Readers or Writers menu and check the applicable boxes.
You can also select the feature types in the canvas or the Navigator pane and press the Delete key.
Move Feature Type is enabled only when you have more than one destination dataset and at least one destination feature type in the workspace.
It is used to quickly change the dataset for a group of feature types. For example, if you have a MIF dataset with feature types and Oracle dataset without any feature types. You can quickly switch all the MIF feature types to Oracle feature types by changing their associated dataset. All the MIF feature types will be moved over to the Oracle dataset.
You can also do this using one feature type at a time by following these steps:
- Display the Destination Feature Type dialog.
- Click on the "Dataset:" drop-down list box and choose from the list of datasets (this changes the feature type's dataset).
To output only one feature type, right-click on a feature type and select Enable Only This Feature Type.
To enable multiple feature types, select the feature types, then right-click and select Enable Objects.
Note: You can also select these options from the Readers and Writers menus.
To disable a feature type and all of its links, right-click on a feature type and choose Disable.
To disable multiple feature types, select all of them, then right-click and select Disable Objects.
Note: You can also select these options from the Readers and Writers menus.
If the structure of the data changes in your workspace (for example, the schema changes or an attribute type changes) you will usually want to keep your workspace up-to-date. This is a particularly useful feature if you are working with databases, or if you are sharing data within a workgroup.
Select Readers > Update Feature Types or Writers > Update Feature Types.