Esri Shapefile Reader Parameters
When reading shapefile features, the SHAPE_GEOMETRY attribute will correspond to the geometry type specified in the shapefile's feature type parameters. For more information on this attribute, see Esri Shapefile Feature Representation
Reader Parameters
Mixed-case attribute names are allowed by default. Selecting this parameter changes attribute names to uppercase text.
Note: This parameter is used only when generating an initial workspace; therefore, it is not editable in Workbench after the workspace has been generated.
This optional parameter controls which character encoding is used to interpret text attributes from the Shapefile. This parameter is useful when the character encoding information stored in the Shapefile is missing or incorrect.
This parameter defaults to a "blank" selection, which means that the character encoding will be automatically detected from the source Shapefile.
If you select any other character encoding, it will take precedence over the automatically detected character encoding.
Shapefiles store attributes in a text-based manner, so numeric attributes are converted to text before being written to disk. This parameter controls how FME reads these numeric types and influences how they will be written out at the end of a transformation.
This parameter defaults to Standard Types, which will cause the reader to convert the text representation of numeric attributes to a binary one, choosing a size that will safely contain all possible values of the fixed-width field. This can be useful when converting from Shapefiles to a format that supports binary storage of numbers.
The other option available is Explicit Width and Precision, which will keep the attributes as fixed-length text-based fields. This option is preferred when performing a Shapefile-to-Shapefile translation, as the field widths will remain the same on write.
If you are unsure which option to use, Standard Types will work in cases where fixed-length numbers is not a concern.
Schema Attributes
Use this parameter to expose Format Attributes in Workbench when you create a workspace:
- In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime.
- In a non-dynamic scenario, you can use this parameter to expose additional attributes on multiple feature types.
Use Search Envelope
Using the minimum and maximum x and y parameters, define a bounding box that will be used to filter the input features. Only features that intersect with the bounding box are returned.
If all four coordinates of the search envelope are specified as 0, the search envelope will be disabled.
When selected, this parameter removes any portions of imported features being read that are outside the Search Envelope.
The example below illustrates the results of the Search Envelope when Clip to Search Envelope is not selected (set to No) and when it is selected (set to Yes).
- No: Any features that cross the search envelope boundary will be read, including the portion that lies outside of the boundary.
- Yes: Any features that cross the search envelope boundary will be clipped at the boundary, and only the portion that lies inside the boundary will be read. The underlying function for the Clip to Search Envelope function is an intersection; however, when Clip to Search Envelope is selected, a clipping operation is also performed in addition to the intersection.
Advanced
This Navigator parameter specifies whether the reader should trim preceding spaces of attribute values. If the option is set to Yes, then preceding spaces in attribute values will be discarded. If the option is set to No, then preceding spaces will be left intact. The default value is Yes.
Geometry
When creating donut geometries, this parameter specifies the criteria that FME will use to detect the geometric properties of the donut(s).
- Orientation Only: FME will detect donut geometry only based on orientation of the rings inputted. Shapefile specifications state that outer boundaries of donut geometries must have clockwise orientation, and any donut holes must have counter-clockwise orientation.
- Orientation and Spatial Relationship: FME will detect donut geometry initially by orientation, and will perform additional geometric validation by analyzing the spatial relationships between the donut’s outer rings and holes. If any invalid donut geometries are identified, FME will attempt to correct geometric anomalies (for example, holes larger than outer ring, holes within holes, etc.)
Note: There can be a significant difference in performance when reading very large datasets.
This parameter controls the handling of measures data associated with geometric data or attributes on the incoming features:
- No (default): Preserves the measures on the features.
- Yes: Measures data is created from the z values on the incoming features, if the z values exist. If measures data exists, it is not overwritten by the z values on the feature.
This Navigator parameter controls whether the SHAPE reader dissolves adjacent holes in polygons read from shapefiles. If the value is set to Yes, then the SHAPE reader will dissolve adjacent holes. The default value is No.
This Navigator parameter controls whether the SHAPE reader reports geometric anomalies in input shapefiles.
By default, the SHAPE reader will perform the following operations to ensure the validity of input features: close unclosed polygons, remove duplicate points, remove empty elements, dissolve holes (if DISSOLVE_HOLES is set to Yes or is not set).
If it is set to Yes, then the shape_geometry_error{} list attribute will be set on input features, and will contain error messages as geometric anomalies are detected and/or fixed. The error messages are of the following format:
Closed Polygon at (x,y)
Duplicated Point at (x,y)
Removed Empty Element #n near (x,y)
Removed Duplicate Point at (x,y)
Invalid Polygon/Donut Orientation near (x,y)
Dissolved Holes