Reader Overview

The SpatialWare reader begins by starting a SpatialWare connection through ODBC with the server upon which the SpatialWare dataset resides. Once connected, the SpatialWare reader queries SpatialWare and passes the resulting features – that is, rows – to FME for processing.

When reading features from SpatialWare, the tables from which features are retrieved, as well as attribute and spatial constraints, can be specified with the <ReaderKeyword>_DEF statement. Multiple queries may be used in a single pass of reading. If no spatial or attribute constraints are specified, then all features from the identified tables are read. SpatialWare stored procedures can also be executed in the same fashion as that of an SQL query. However, the user needs to be familiar with using SpatialWare spatial queries. An example of the syntax is shown below (note positions of the single quotation marks):

exec sp_spatial_query 'select * from canada where ST_Contains(canada.sw_geometry, ST_Point(-101.362325, 48.999346))'

This will return the features containing the point (-101.362325, 48.999346).

The SpatialWare reader requires that at least one <ReaderKeyword>_DEF, one <ReaderKeyword>_DEF_OVERRIDE, or one <ReaderKeyword>_IDs statement be specified, identifying the queries by which data is to be retrieved. If none of these statements are specified, then no features are read from the database.