Question

ESRIReprojector input : 'datum definition does not exist'

  • 9 June 2022
  • 1 reply
  • 8 views

Due to a number of custom coordinate systems used by the organization - I have to use ESRI Reprojector to set the CRS of some incoming data. So CoordinateSystemSetter is out of the question unfortunately.

 

I used a PythonCaller and Arcpy to generate the string required, based on this help doc - in the format of ESRIWKT|<name>|<esriwkt> where <name> is the coordinate system name, and <esriwkt> is the WKT (Well-Known Text).

 

sr = arcpy.SpatialReference(int(FME_MacroValues['EPSG']))
str = 'ESRIWKT|{}|{}'.format(sr.name, sr.exportToString())
feature.setAttribute('coordsys', str)

But I'm getting this warning, (and the crs applied is not correct). the EPSG code I tested with was 5383.

Datum definition SIRGAS-ROU98 does not exist.
Ellipsoid definition wkt_auto_1 does not exist.
Esri Reprojector: Specified geotransformation `' (forward) may be inappropriate for reprojection from `_FME_0' (GCS: `GCS_SIRGAS-ROU98') to `_FME_0' (GCS: `GCS_SIRGAS-ROU98') using the ESRI reprojection engine

For reference, this is the string passed onto ESRIReprojector:

ESRIWKT|SIRGAS-ROU98_UTM_Zone_22S|PROJCS["SIRGAS-ROU98_UTM_Zone_22S",GEOGCS["GCS_SIRGAS-ROU98",DATUM["D_SIRGAS-ROU98",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",10000000.0],PARAMETER["Central_Meridian",-51.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]];-5120900 1900 10000;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision

Did i configure the string wrong or used the wrong name? help!


1 reply

Userlevel 2
Badge +17

Hi @gracecai​,

The datum and ellipsoid warnings are produced by FME attempting to convert the Esri coordinate system to a usable FME (CSMAP) coordinate system. The coordinate system it creates does not have a valid datum, but does contain a copy of the Esri WKT that will be used when writing out to any format that supports Esri coordinate systems. If you are writing out to an Esri format, then all should be well.

The EsriReprojector warning is standard when no transformation is chosen. This warning has been removed from newer versions of FME.

The WKT you are getting from arcpy seems to have some extra values at the end, after the ";". I would recommend splitting str by ';', then using only the [0] element of the resulting list.

Reply