PostGIS (Raster) Writer Feature Type Parameters
|
To access feature type parameters, click the gear icon Tip To always display the editor in FME Workbench, you can select View > Windows > Parameter Editor.
General All feature types share similar General parameters, which may include Feature Type Name, Reader or Writer information, and Geometry. In most Writer Feature Type parameter dialogs, you can also control Dynamic Schema Definitions. Some database formats accept Table or Index Qualifier prefixes on the output table feature type. |
Table Settings: General
This parameter specifies how features will be written into the destination table. Supported feature operations are described below. Note that the described behavior can be dependent on the selected options, as well as the underlying table properties.
- More information about Feature Operations.
|
Option |
Description |
If the Row Does Not Exist |
If the Row Exists |
|
Insert |
The writer appends a new row to a table using input feature attributes. |
The writer creates a new row using input feature attributes. |
Not always applicable: if the table does not have a unique key or it has an automatically generated unique key, insertion is always possible. The database cannot violate its key constraints; therefore, errors can occur on row insertion. For example, if there is a unique key and a user specifies the value with the feature, and the feature already exists, then FME Workbench logs an error. This error might be in the form of a rejected feature, or the database may stop processing altogether. |
|
Update |
The writer updates existing row(s) in a table using input feature attributes. A selection method must be specified in the Row Selection group. |
The writer rejects the input feature or logs an error if it is unable to continue. |
The writer only changes values of the existing row(s) corresponding to the input feature that differ from the input feature. |
|
Delete |
The writer deletes an existing row(s) in a table. A selection method must be specified in the Row Selection group. |
The writer rejects the input feature or logs an error if it is unable to continue. |
The writer deletes existing row(s) corresponding to the input feature. |
|
Upsert |
The writer updates the existing row(s) in a table using input feature attributes if the specified conflict arises. If no conflicts arise, the writer appends a new row to a table using input feature attributes. |
The writer creates a new row using input feature attributes. |
If the specified conflict arises, the writer will change only values of the existing row(s) corresponding to the input feature that differ from the input feature. If other conflicts arise, the writer will reject the input feature or log an error if it is unable to continue. |
|
fme_db_ |
The feature operation will be determined by the attribute fme_db_operation on each input feature. A selection method must be specified in the Row Selection group. The value of fme_db_operation will be processed according to the steps below. Note The processing steps listed below depend on a format's available Feature Operation options.
Note about earlier FME versions: To use fme_db_operation, you must set Feature Operation to this option. In previous versions of FME, you could set fme_db_operation when the destination feature type was set to Insert, Update, Upsert, or Delete. Doing this now will cause feature rejection. |
The action depends on the operation; however, in general, if nothing is specified, the value is treated as an Insert. | The value is treated as an Insert. |
Controls how the feature type handles destination tables:
- Use Existing – Write to an existing table If the destination table does not exist, the translation will fail.
- Create If Needed – Create the destination table if it does not exist.
- Drop and Create – (This option is not available in all formats.) Drop the destination table if it exists, and then create it. The writer will drop and re-create the table before writing any features to it. Tables will be overwritten when the first input feature is processed. If no features are sent to a feature type, then the corresponding table will not be overwritten.
- Truncate Existing – (This option is not available in all formats.) If the destination table does not exist, the translation will fail. Otherwise, delete all rows from the existing table.
When updating features, users have a choice to update, or skip, their spatial column(s). Possible options are:
- Yes: The spatial column(s) specified by the user will be updated. IFMENulls will be written as null values and replace existing spatial values.
- No: No spatial columns will be updated.
|
Feature Operation Option |
Row Selection |
|---|---|
|
Insert |
Row Selection is ignored. |
|
Update, Upsert, Delete (Options may differ depending on a format's available Feature Operation options.) |
A Row Selection condition needs to be specified for selecting which rows to operate on. |
This parameter group offers two methods to construct the selection condition:
Match Columns
The columns specified in the corresponding column picker dialog will be used for matching destination rows. All matching rows will be selected for update, upsert, or delete. If any feature attributes corresponding to the specified match columns contain null or missing values, the feature will be rejected.
WHERE Clause
This parameter opens a WHERE Clause Builder. You can also type a WHERE clause inline, without launching the Builder. It is optional to start the clause with the word WHERE.
The WHERE Clause Builder makes it easy for users to reference feature attribute values, destination table columns, and invoke FME functions. The WHERE clause is first evaluated as an FME expression, before being passed onto the destination database.
If the WHERE clause is incorrect or if its evaluation results in failure, the translation will fail. Otherwise, if the WHERE clause passes FME evaluation but it is SQL invalid, the feature will be rejected or the translation will fail.
For advanced users, conditional FME expressions created through the Conditional Value editor can be used to create WHERE clauses.
These options take effect only when FME creates a table.
Create with OIDs
Specifies whether or not a system OID (object identifier) column should be created.
OIDs are not guaranteed to be unique feature identifiers, and their use is deprecated outside of system tables. If set to No, then the OID column is not created.
Create GiST Index
This parameter determines whether or not a GiST index is created on the geometry column of the table (as long as one exists). This indexing of the geometry column is required for spatial query performance.
Table Settings: Raster
Specifies the name of the column to be created that will hold the raster data when creating a new PostGIS table.
Specifies the spatial referencing information for the rasters in the table. By default, this value is not set, which causes the conversion of the FME coordinate system of the writer into an SRID to be used as the SRID for the given table.
Alternatively, a specific integer SRID value may be specified. Specified SRID values should correspond to an existing spatial reference identifier value stored in the (SRID) column in the global table spatial_ref_sys.
- All rasters within a given table must have the same spatial referencing.
- If this parameter is left blank, tables will be created with the SRID of the writer coordinate system.
- If no SRIDs are desired, the value for the SRID field can be set to 0, indicating no spatial reference system.
When set to Yes, drops all raster constraints for the column being written. The default is No.
All the constraints below can be added to existing tables.
Add SRID Constraint
Adds a raster constraint for the column being written, and specifies that all rasters in the column must have the same SRID.
Add Scale X Constraint
Adds a raster constraint for the column being written, and specifies that all rasters in the column must have the same x spacing.
Add Scale Y Constraint
Adds a raster constraint for the column being written, and specifies that all rasters in the column must have the same y spacing.
Add Block Size X Constraint
This parameter adds a raster constraint for the column being written, and specifies that all rasters in the column must have the same number of pixels per raster row.
Add Block Size Y Constraint
Adds a raster constraint for the column being written, and specifies that all rasters in the column must have the same number of pixels per raster column.
Add Same Alignment Constraint
Adds a raster constraint for the column being written, and specifies that all rasters in the column must have the same alignment (skew, scale, and SRID).
Add Regular Blocking Constraint
Adds a raster constraint for the column being written, and specifies that the rasters in the column form a rectangular grid.
Add Number of Bands Constraint
Adds a raster constraint for the column being written, and specifies that all rasters in the column must have the same number of bands.
Add Pixel Types Constraint
Adds a raster constraint for the column being written, and specifies that all rasters in the column must have the same data type.
Add Nodata Values Constraint
Adds a raster constraint for the column being written, and specifies that all rasters in the column must have the same Nodata value.
Add Out-DB Constraint
Adds a raster constraint for the column being written, and specifies that all rasters in the column must have the same value for the out-db flag.
Add Maximum Extent Constraint
Adds a raster constraint for the column being written, and specifies that all rasters added to the column must be within the extent of the existing rasters.
An Overview constraint can be added to existing tables.
- Overview Base Schema: Specifies that the current raster column being written is an overview of another raster column. Used with the Overview Base Table and Overview Base Column parameters, it specifies the column that is the “base” column for the current raster column being written.
- Overview Base Table: Specifies that the current raster column being written is an overview of another raster column. Used with the Overview Base Schema and Overview Base Column parameters, it specifies the column that is the “base” column for the current one. If Add Overview Constraint is selected, this parameter is required.
- Overview Base Column: Specifies that the current raster column being written is an overview of another raster column. Used with the Overview Base Schema and Overview Base Table parameters, it specifies the column that is the “base” column for the current one. If Add Overview Constraint is selected, this parameter is required.
- Overview Factor: Specifies that the current raster column being written is an overview of another raster column. This parameter specifies what pyramid level this column represents. Level 1 is assumed to be the base data. Each higher level reduces the number of rows and columns by a factor of 2. For example, if level 1 is 512x512, then level 2 should be 256x256, level 3 should be 128x128, etc. If Add Overview Constraint is selected, this parameter is required.
Table Settings: Advanced
Specifies the maximum allowable size for a raster.
PostGIS stores a raster as a single blob, including all of its metadata. Thus, FME must process the raster as a single component and attempting to write very large rasters may result in out-of-memory errors. By default this is set at a relatively small size. This may be increased to accommodate larger rasters if memory is available.
Sets the byte order of the output raster. Valid values are MSB, LSB, and machine (meaning the native byte order of the machine running FME).
Specifies the bit depth of the data being written. Possible values are 1,2,4, and AUTO:
- When AUTO is selected, the bit depth will be determined by the interpretation of the input raster bands.
- When a specific bit depth is selected, the interpretation of the input raster bands must be one of UINT8, GRAY8, RED8, GREEN8, BLUE8, and ALPHA8.
Determines if the database function to vacuum and analyze the table is performed once the table is successfully written. This will build statistics for the table.
Values cannot usually be written to serial columns; available values come from the database. This writer option allows the writer to take values from incoming features.
If one of the attributes on an incoming feature corresponds with a serial column in the database table, there are two options:
- No (default) – The value will come from the database sequence.
- Yes – The value will come from the feature (which is the same behavior as other column types).
on a feature type in the