1.. _vector.fme:
2
3FMEObjects Gateway
4==================
5
6.. shortname:: FME
7
8.. build_dependencies:: FME
9
10Feature sources supported by FMEObjects are supported for reading by OGR
11if the FMEObjects gateway is configured, and if a licensed copy of
12FMEObjects is installed and accessible.
13
14To using the FMEObjects based readers the data source name passed should
15be the name of the FME reader to use, a colon and then the actual data
16source name (i.e. the filename). For instance,
17"NTF:F:\DATA\NTF\2144.NTF" would indicate the NTF reader should be used
18to read the file There are a number of special cases:
19
20-  A data source ending in .fdd will be assumed to be an "FME Datasource
21   Definition" file which will contain the reader name, the data source
22   name, and then a set of name/value pairs of lines for the macros
23   suitable to pass to the createReader() call.
24-  A datasource named PROMPT will result in prompting the user for
25   information using the regular FME dialogs. This only works on
26   Windows.
27-  A datasource named "PROMPT:filename" will result in prompting, and
28   then having the resulting definition saved to the indicate files in
29   .fdd format. The .fdd extension will be forced on the filename. This
30   only works on Windows.
31
32Each FME feature type will be treated as a layer through OGR, named by
33the feature type. With some limitations FME coordinate systems are
34supported. All FME geometry types should be properly supported. FME
35graphical attributes (color, line width, etc) are not converted into OGR
36Feature Style information.
37
38Caching
39-------
40
41In order to enable fast access to large datasets without having to
42retranslate them each time they are accessed, the FMEObjects gateway
43supports a mechanism to cache features read from FME readers in "Fast
44Feature Stores", a native vector format for FME with a spatial index for
45fast spatial searches. These cached files are kept in the directory
46indicated by the OGRFME_TMPDIR environment variable (or TMPDIR or /tmp
47or C:\\ if that is not available).
48
49The cached feature files will have the prefix FME_OLEDB\_ and a master
50index is kept in the file ogrfmeds.ind. To clear away the index delete
51all these files. Do not just delete some.
52
53By default features in the cache are re-read after 3600s (60 minutes).
54Cache retention times can be altered at compile time by altering the
55fme2ogr.h include file.
56
57Input from the SDE and ORACLE readers are not cached. These sources are
58treated specially in a number of other ways as well.
59
60Caveats
61-------
62
63#. Establishing an FME session is quite an expensive operation, on a
64   350Mhz Linux system this can be in excess of 10s.
65#. Old files in the feature cache are cleaned up, but only on subsequent
66   visits to the FMEObjects gateway code in OGR. This means that if
67   unused the FMEObjects gateway will leave old cached features around
68   indefinitely.
69
70Build/Configuration
71-------------------
72
73To include the FMEObjects gateway in an OGR build it is necessary to
74have FME loaded on the system. The *--with-fme=*\ **$FME_HOME**
75configuration switch should be supplied to configure. The FMEObjects
76gateway is not explicitly linked against (it is loaded later when it may
77be needed) so it is practical to distribute an OGR binary build with
78FMEObjects support without distributing FMEObjects. It will just "work"
79for people who have FMEObjects in the path.
80
81The FMEObjects gateway has been tested on Linux and Windows.
82
83--------------
84
85More information on the FME product line, and how to purchase a license
86for the FME software (enabling FMEObjects support) can be found on the
87Safe Software web site at `www.safe.com <http://www.safe.com/>`__.
88Development of this driver was financially supported by Safe Software.
89