OpenStreetMap (OSM) XML Reader Parameters

The OpenStreetMap (OSM) is a collaborative mapping project for creating a free and editable map of the whole world. Further information on OSM can be found at http://www.openstreetmap.org.

OpenStreetMap data can be downloaded in a topologically structured XML format. The data primitives in an OSM data file are nodes, ways and relations.

  • A node is a lat/lon pair.
  • A way is a list of at least two node references describing a linear features. Ways can be closed, in which case the first and the last node are identical. Areas are not explicitly represented in OSM but are identified via community approved tags.
  • Relations are a group of zero or more primitives with an associated role.

All data in OSM are in the WGS-84 datum.

OSM has no explicit schema (feature type) definitions. Each node, way, and relation can have an arbitrary number of attributes, called tags in OSM. A tag is composed of a key and a value. The OpenStreetMap wiki does define a set of recommend tags that can be used to classify the nodes and ways into higher level groupings, i.e., feature types. The community-defined feature types can be found at http://wiki.openstreetmap.org/index.php/Map_Feature.

The FME OSM reader settings can help influence the classification of the OSM data being read.

Feature Types

These parameters are used only when generating an initial workspace, so they are not editable within FME Workbench after the workspace has been generated.

OSM Map Features

These parameters are used only when generating an initial workspace, so they are not editable within FME Workbench after the workspace has been generated.

Geometry and Attribute Options

Additional Attributes to Expose

Use this parameter to expose Format Attributes in FME 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, this parameter allows you to expose additional attributes on multiple feature types. Click the browse button to view the available format attributes (which are different for each format) for the reader.
 

A search envelope (also known as a bounding box) is a rectangular area that defines a geographic area. In FME, the easiest way to define a search envelope is to use search envelope parameters.

Defining a search envelope is the most efficient method of selecting an area of interest because FME will read only the data that is necessary – it does not have to read an entire dataset. Search Envelope parameters apply to both vector and raster datasets and can be particularly efficient if the source format has a spatial index.

Most FME readers have parameters to define the search envelope of data that is being read:

Screenshot with blank search envelope min and max x and y parameters

The parameters include the x and y coordinates of the bounding box as well as a parameter that defines the coordinate system.

How to Define the Bounding Box

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. Note that the bounding box intersection is not a full geometry intersection (based on spatial relationships) that would be returned by a transformer like the SpatialFilter.

Note  If all four coordinates of the search envelope are left at 0, the search envelope will be disabled even if this option is checked.

Search Envelope Coordinate System

Specifies the coordinate system of the search envelope if it is different than the coordinate system of the data. The coordinate system associated with the data to be read must always be set if this parameter is set.

If this parameter is set, the minimum and maximum points of the search envelope are reprojected from the Search Envelope Coordinate System to the reader’s coordinate system prior to applying the envelope.

Clip to Search Envelope

The underlying function for Use Search Envelope is an intersection; however, when Clip to Search Envelope is checked, a clipping operation is also performed.

  • When left unchecked (set to No), features that overlap the boundary will be included in their full (unclipped) form.
  • When checked (set to Yes), this option instructs FME to clip features to the exact envelope boundary. FME removes any portions of imported features being read that are outside the search envelope.

Clip to Search Envelope: No

Clip to Search Envelope: Yes

Any features that cross the search envelope boundary will be read, including the portion that lies outside of the boundary.

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 search envelope includes the bounding box and the extent of the raster.

The search envelope includes only the area within the bounding box.

The raster size will still match the bounding box, but the area without data will be filled with Nodata values to represent the absence of data, if the source raster has them.

Raster Nodata may be a single value across all bands, a single value per band, or a separate alpha or transparency band that indicates the lack of data values (this is more common in images than other types of rasters).