Skip to main content

FME version: 2016.1.3.2 (20170214 - Build 16717 - WIN64)

Hi, i am trying to create a custom coordinate system (custom ellipsoid, custom datum, custom transformation and custom crs).

The CRS i am trying to create is the EPSG:26331 (as parametrized by EPSG).

Looking at the Coordinate System Gallery, there is a crs with name equal to EPSG:26331 (i will call this FME EPSG:26331)..

But there is two points that i want to modify:

  • Ellipsoid Parameters
  • Datum Parameters.
  1. Ellipsoid Parameters:

Searching into EPSG Registry (http://epsg-registry.org), the ellipsoid used by EPSG:26331 is EPSG:7012 - Clarke 1880 (RGS). This ellipsoid has:

  • semi-major axis (E_RAD): 6378249.145 meter
  • inverse flattening (inv_f): 293.465.

using P_RAD = E_RAD 81-(1/inv_f)] = 6356514.8695497755

In FME, this same ellipsoid has:

  • semi-major axis (E_RAD): 6378249.1449999996 meter
  • semi-minor axis (P_RAD): 6356514.8700000001.

using the same formula above, we get inv_f = 293.4650060791153. A little different from what is in EPSG. (this was one of the motivation to customize this CRS).

2. Datum Parameters

DELTA_X: -92

 

DELTA_Y: -93

 

DELTA_Z: 122

 

DESC_NM: Minna, Nigeria

 

ELLIPSOID: CLRK80

 

SOURCE: US Defense Mapping Agency, TR-8350.2-B, December 1987

 

USE: MULREG

I want to use GEOCENTRIC method (this is the second motivation to customize this CRS).

So i create the custom ellipsoid, the custom datum, custom datum transformation and the crs (they are below).

ELLIPSOID_DEF CLARK_1880_RGS                					\
    DESC_NM "EPSG:7012 - Clarke 1880 RGS - a=6378249.145 e inv_f=293.465"      \
    SOURCE "EPSG V9.2"                                               \
    E_RAD   6378249.145 \
    P_RAD   6356514.8695497755


#-----------------------------
#    MINNA - Nigeria EPSG:4623
#-----------------------------


DATUM_DEF MINNA_NIGERIA                                        \
    DESC_NM "EPSG:6263."  \
    SOURCE  "EPSG V9.2"                                        \
    ELLIPSOID CLARK_1880_RGS                                    
    #ELLIPSOID CLRK80


# Minna-Nigeria (EPSG:6263) para WGS-1984 (EPSG:4326) - EPSG:1168
# -------------------------------------
#    SRC_DTM "MINNA"                          \
XFORM_DEF Minna_to_WGS_1984_2                       \
    SRC_DTM "MINNA_NIGERIA"                         \
    TRG_DTM "WGS84"                                 \
    DESC_NM "Minna-NIG to WGS1984. DMA-Nga" \
    SOURCE  "EPSG v9.2"                             \
    GROUP   "custom"                             \
    EPSG_NBR 1168                                   \
    INVERSE "Yes"                                    \
    METHOD "GEOCENTRIC"                             \
    DELTA_X -92.0                                   \
    DELTA_Y -93.0                                   \
    DELTA_Z 122.0                                   


# UTM MC 3E / 31N MINNA_NIGERIA - EPSG:26331
# DT_NAME MINNA \
COORDINATE_SYSTEM_DEF "UTM-31N.Minna-NIG"               \
DESC_NM "UTM MC3E/31N Minna - NIG." \
DT_NAME MINNA_NIGERIA \
GROUP "custom UTM"   \
SOURCE "custom"  \
PROJ UTM  \
PARM1 31  \
PARM2 1 \
MAP_SCL 1 \
UNIT METER


COORDINATE_SYSTEM_DEF "TM-6E.WGS1984"\
DESC_NM "Transversa de Mercator, MC6E, FE 500k, FN 0, WGS-1984"\
DT_NAME WGS84 \
GROUP "custom TM" \
SOURCE "custom" \
PROJ TM \
PARM1 6 \
ORG_LAT 0 \
SCL_RED 0.9996 \
X_OFF 500000 \
Y_OFF 0 \
UNIT METER

Using the workflow (attached: ), i test the transformation from EPSG:26331 to TM-6E.WGS1984 (custom crs).

I get this response from log and no transformation is done.

CS-MAP Reprojector: User specifed transformation 'Minna_to_WGS_1984_2' will be used for 'UTM-31N.Minna-NIG' -> 'TM-6E.WGS1984'

Reprojector: Using transformation `Minna_to_WGS_1984_2,Forward(Geocentric,EPSG:1168)' when reprojecting from UTM-31N.Minna-NIG to TM-6E.WGS1984

Geocentric inverse calculation failed to converge.

I tried changing the custom datum transformation, setting "Inverse" to no (i only want to transform from Minna to WGS-84, the reverse transformation is not needed right now).

I change the custom datum transformation in file MyCoordSysDefs.fme, close the FME Workbench, reopen but any change to this parameter is ignored (inspect the datum transformation show the "Inverse" always as yes even when i change that to no).

If i choose to use the build-in ellipsoid (CLRKE80) instead the custom ellipsoid (CLARK_1880_RGS), everything works.

Am i doing something wrong with the custom ellipsoid or with the edition of MyCoordSysDef.fme file?

Hi @luigibr,

I copied the definitions above into a new .fme file in my Documents\\FME\\CoordinateSystems folder, then tried your workspace in FME 2016. The reprojection was successful for me, regardless of the ellipsoid the datum definition was set to use.

The difference between the resulting points of the two ellipsoids was about 0.00000005 meters, so I think the existing ellipsoid should be OK for your conversion.

FME 2016 and 2017 ignore the INVERSE setting in the transformation definition. This has been fixed in FME 2018.


Hi @luigibr

I would suggest removing the quotes around the text for SRC_DTM, TRG_DTM, INVERSE, and METHOD and seeing if that helps. Not a Coordinate System expert myself but from looking at the examples from MyCoordSysDefs.fme, that may be what is causing the problem.

Kind regards,

Debbi

 


Hi @luigibr,

I copied the definitions above into a new .fme file in my Documents\\FME\\CoordinateSystems folder, then tried your workspace in FME 2016. The reprojection was successful for me, regardless of the ellipsoid the datum definition was set to use.

The difference between the resulting points of the two ellipsoids was about 0.00000005 meters, so I think the existing ellipsoid should be OK for your conversion.

FME 2016 and 2017 ignore the INVERSE setting in the transformation definition. This has been fixed in FME 2018.

Thanks @DebbiAtSafe and @DaveAtSafe!

 

I turn on the pc today, tried again and everything works. (definitely the problem was between the chair and the keyboard lol).

 


Thanks @DebbiAtSafe and @DaveAtSafe!

 

I turn on the pc today, tried again and everything works. (definitely the problem was between the chair and the keyboard lol).

 

I'm glad you were able to get working!

 


Reply