ESRI Exceptions

From Fmepedia


Q) What do I do when an ESRI coordinate system is encountered that FME does not recognize? What if a new custom coordinate system in FME is not recognized by ArcGIS?

A). FME maintains a list of naming associations between ESRI and FME in an exceptions file at FME_HOME\Reproject\Exceptions\esriwkt.db. For ESRI coordinate systems that FME does not know about, you can add your own ESRI - FME coordinate system association in a file called MyExceptions.db in the same directory as long as you follow the same syntax.

Keeping a separate exceptions file will make it easier to drop in and maintain your own exceptions independent of FME upgrades.

The same logic can be used to make associations for other formats such as AUTODESK, MAPINFO and ORACLE, but the formatting of the OGC WKT string for these formats is not as straightforward so you should probably involve support (http://www.safe.com/support/contact/form.php).




Table of contents


Adding a new Coordinate System to MyExceptions.db

  • Open the data in question in the FME Viewer
  • Select a feature, then get the properties of the coordinate system -- one of those properties will be the ESRI_WKT.
  • Create or edit a file called MyExceptions.db in the directory:
FME_HOME\Reproject\Exceptions\
where FME_HOME is replaced by your FME installation directory -- typically it is C:\Program Files\FME
  • Copy the ESRI_WKT string from the FME Viewer into the MyExceptions.db exceptions file and save.

The syntax for the MyExceptions.db file is the same as they are in esriwkt.db as follows:

  ESRI|<FME CSname>|<ESRI WKT String>

For example, first let's take a look at how this is already done in esriwkt.db:

For the FME CS:LL84

LL84 Coordinate System Properties in FME Viewer:

  CS_NAME: LL84
  DESC_NM: WGS84 Lat/Long's, Degrees, -180 ==> +180
  DT_NAME: WGS84
  EPSG: 4326
  ESRI_WKT:    GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199433]]
  GROUP: LL
  ...

The esriwkt.db entry is:

  ESRI|LL84|GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]


MyExceptions.db example

Here is an example of adding a mapping from an ESRI coordinate system definition to an existing FME coordinate system name:

1) First, view the source ESRI data in the FME Viewer. Select any feature, then get the properties of the coordinate system (which will likely be named FME_0 since no match was found), and in that coordinate system, copy the value of the ESRIWKT string.

2) Then, we edit the MyExceptions.db and add a line that contains the FME name (let's assume in this case it should have been N_Polar_Azmed).

  ESRI|N_Polar_Azmed|

3) Finally, we paste the ESRIWKT string we copied in step 1 so that MyExceptions.db now reads as follows:

  ESRI|N_Polar_Azmed|PROJCS["North_Pole_Azimuthal_Equidistant",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]], PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]], PROJECTION["Azimuthal_Equidistant"],PARAMETER["False_Easting",0.0], PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Latitude_Of_Origin",90.0],UNIT["Meter",1.0]]


ESRI Exceptions Notes

  • You may need to double check the ESRI coordinate system list from within ArcGIS to make sure you have the right association.
  • The exceptions association is done as an exact string match, so decimals and capitals will make a difference. e.g. 1 != 1.0.
  • You can also get the ESRI_WKT from the .PRJ component of a SHAPE file, although there may be slight differences and you may need to try both. Make sure you change all whole numbers to decimals as .PRJ typically stores zero as '0' whereas FME will usually require a 0.0.
  • Also, remember you can have multiple entries or associations for a particular FME coordinate system, but the first one encountered is the one that will be used for writing.
  • If you still have trouble, try creating a shape or geodatabase file with the appropriate coordinate system from within ArcGIS, and then use FME Viewer to read the ESRIWKT from the ESRI generated file. A file created by ArcGIS explicitly sets the ESRIWKT, whereas a file created from an FME translation to an ESRI format using a custom coordinate system may have a slightly different ESRIWKT.


Testing

Its a good idea to thoroughly test your new coordinate system referencing as follows:

1. Try reading existing data with FME, and make sure it is now correctly recognized.

2. Write out the same data with the projection set to same as source.

3. Read the data you just exported with FME to make sure it can read its own data you just generated.

4. Make sure you can read and recognize the new FME generated data with ArcCatalog.

5. Make sure data modified or created by ArcGIS can be recognized by FME Viewer.


Help

See the exceptions page for more info on FME exceptions in general.

If you need further assistance please contact support (http://www.safe.com/support/contact/form.php). Its also a good idea to keep us informed of your updates if there is any chance that the added coordinate system association might benefit other users.

User Comments Add a new comment