Residuals API

Residuals API was designed to assess the quality of data and models, identify potential errors, and make adjustments for more accurate results. In geodesy, residuals represent the difference between an observed value and its corresponding calculated value within a model.

Request example:


curl --location 'https://api.geodesy.online/v1/residuals/blh/blh' \
--header 'API_KEY: [your_api_key]' \
--header 'Content-Type: application/json' \
--data '{
    "inCs": {
        "ellipsoid": {
            "a": 6378137.000,
            "invF": 298.257223563
        },
        "wx": 0,
        "wy": 0,
        "wz": 0,
        "dx": 0,
        "dy": 0,
        "dz": 0,
        "m": 1,
        "direction": 1,
        "rotation": 1
    },
    "outCs": {
        "ellipsoid": {
            "a": 6377563.396,
            "invF": 299.324975315035
        },
        "wx": 0,
        "wy": 0,
        "wz": 0,
        "dx": -375.000,
        "dy": 111.000,
        "dz": -431.000,
        "m": 1,
        "direction": 1,
        "rotation": 0
    },
    "datumParams": {
            "wx": -2.553464548549763,
            "wy": 0.7155432658678553,
            "wz": 3.3091491740060897,
            "dx": -12.104945763063313,
            "dy": 4.181230007144023,
            "dz": -43.322107587856884,
            "m": 1.2452244707500681,
            "toWgs84": false
    },
    "inCoords": [
        {
            "b": 52.519999999999996,
            "l": 13.405000000000001,
            "he": 76.48234
        },
        {
            "b": 55.7558,
            "l": 37.6173,
            "he": 163.53922
        },
        {
            "b": 51.5074,
            "l": 0.1278,
            "he": 48.78179
        },
        {
            "b": 48.8566,
            "l": 2.3522000000000003,
            "he": 76.61337
        },
        {
            "b": 48.208200000000005,
            "l": 16.3738,
            "he": 237.73002
        }
    ],
    "outCoords": [
        {
            "b": 52.51938178275444,
            "l": 13.407871678267504,
            "he": 52.57064618356526
        },
        {
            "b": 55.754669620429276,
            "l": 37.62234621822496,
            "he": 198.4617262436077
        },
        {
            "b": 51.50693981005131,
            "l": 0.12941093231121847,
            "he": 3.9540702598169446
        },
        {
            "b": 48.85585923419985,
            "l": 2.3539212329015466,
            "he": 37.83961013611406
        },
        {
            "b": 48.207120289525164,
            "l": 16.37665531558625,
            "he": 227.6711773443967
        }
    ]
}'
                     

Response example:


{
    "result": {
        "inCoordsXYZ": [
            {
                "x": 3783290.325702681,
                "y": 901655.7894424385,
                "z": 5038279.793590733
            },
            {
                "x": 2849553.8308836683,
                "y": 2195822.8568445346,
                "z": 5249325.466589764
            },
            {
                "x": 3978024.6361867688,
                "y": 8873.121126107762,
                "z": 4968913.118215535
            },
            {
                "x": 4200965.160626411,
                "y": 172561.8451384772,
                "z": 4780139.036832627
            },
            {
                "x": 4085926.234503932,
                "y": 1200523.5192577157,
                "z": 4732512.821445564
            }
        ],
        "outCoordsXYZ": [
            {
                "x": 3782921.570865314,
                "y": 901567.9056414681,
                "z": 5037909.625794008
            },
            {
                "x": 2849274.2540920293,
                "y": 2195607.419219644,
                "z": 5248936.415269894
            },
            {
                "x": 3977637.71875313,
                "y": 8872.258093429873,
                "z": 4968549.069186447
            },
            {
                "x": 4200558.856929515,
                "y": 172545.1555176538,
                "z": 4779791.432514833
            },
            {
                "x": 4085531.617996853,
                "y": 1200407.573356922,
                "z": 4732169.327417885
            }
        ],
        "residualsXyz": [
            {
                "x": 0.0,
                "y": 0.0,
                "z": 0.0
            },
            {
                "x": 0.0,
                "y": 0.0,
                "z": 0.0
            },
            {
                "x": 0.0,
                "y": 0.0,
                "z": 0.0
            },
            {
                "x": 0.0,
                "y": 0.0,
                "z": 0.0
            },
            {
                "x": 0.0,
                "y": 0.0,
                "z": 0.0
            }
        ],
        "residuals": [
            {
                "x": 1.3848532821302442,
                "y": -6.107081397702952,
                "z": 1548642.3430101369
            },
            {
                "x": 2.1781896730365133,
                "y": -5.31385305549238,
                "z": 1550109.459469024
            },
            {
                "x": 0.8336893872151592,
                "y": -6.36799354333653,
                "z": 1548160.8627803214
            },
            {
                "x": 0.9168746166841544,
                "y": -6.053046818150074,
                "z": 1548220.5711666187
            },
            {
                "x": 1.4816221050989355,
                "y": -5.632056920853213,
                "z": 1548735.6298175594
            }
        ]
    },
    "success": true
}
                    

Request example:


curl --location 'https://api.geodesy.online/v1/residuals/blh/tmerc' \
--header 'API_KEY: [your_api_key]' \
--header 'Content-Type: application/json' \
--data '{
    "inCs": {
        "ellipsoid": {
            "a": 6378137.000,
            "invF": 298.257223563
        },
        "wx": 0,
        "wy": 0,
        "wz": 0,
        "dx": 0,
        "dy": 0,
        "dz": 0,
        "m": 1,
        "direction": 1,
        "rotation": 1
    },
    "outCs": {
        "bo": 0,
        "lo": -3,
        "no": 0,
        "eo": 500000,
        "scale": 0.999600,
        "datum": {
            "ellipsoid": {
                "a": 6377563.396,
                "invF": 299.324975315035
            },
            "wx": 0,
            "wy": 0,
            "wz": 0,
            "dx": -375.000,
            "dy": 111.000,
            "dz": -431.000,
            "m": 1,
            "direction": "fromWgs84",
            "rotation": "clockwise"
        },
        "planParams": {
            "method": "helmert",
            "params": {
                "shiftDN": -2504.949,
                "shiftDE": 5762.07070,
                "nRotationCenter": 23.63108,
                "eRotationCenter": 2.83603,
                "m": 1.0000358,
                "alpha": -0.00015
            }
        },
        "heightParams": {
            "method": "hconst",
            "params": {
                "const": 10
            }
        }
    },
    "datumParams": {
            "wx": -2.553464548549763,
            "wy": 0.7155432658678553,
            "wz": 3.3091491740060897,
            "dx": -12.104945763063313,
            "dy": 4.181230007144023,
            "dz": -43.322107587856884,
            "m": 1.2452244707500681,
            "toWgs84": false
    },
    "inCoords": [
        {
            "b": 52.519999999999996,
            "l": 13.405000000000001,
            "he": 76.48234
        },
        {
            "b": 55.7558,
            "l": 37.6173,
            "he": 163.53922
        },
        {
            "b": 51.5074,
            "l": 0.1278,
            "he": 48.78179
        },
        {
            "b": 48.8566,
            "l": 2.3522000000000003,
            "he": 76.61337
        },
        {
            "b": 48.208200000000005,
            "l": 16.3738,
            "he": 237.73002
        }
    ],
    "outCoords": [
        {
            "n": 6195167.2871562345,
            "e": 2538595.5026703817,
            "he": 225.79575789161026,
            "hn": 60.0
        },
        {
            "n": 6331354.575516818,
            "e": 2553725.34303238,
            "he": 227.67881206795573,
            "hn": 61.0
        },
        {
            "n": 6467204.742880119,
            "e": 2564588.269988144,
            "he": 229.64866976998746,
            "hn": 63.0
        },
        {
            "n": 6331354.575516818,
            "e": 2553725.34303238,
            "he": 227.67881206795573,
            "hn": 61.0
        },
        {
            "n": 6467204.742880119,
            "e": 2564588.269988144,
            "he": 229.64866976998746,
            "hn": 63.0
        }
    ]
}'
                     

Response example:


{
    "result": {
        "inCoordsXYZ": [
            {
                "x": 3783290.325702681,
                "y": 901655.7894424385,
                "z": 5038279.793590733
            },
            {
                "x": 2849553.8308836683,
                "y": 2195822.8568445346,
                "z": 5249325.466589764
            },
            {
                "x": 3978024.6361867688,
                "y": 8873.121126107762,
                "z": 4968913.118215535
            },
            {
                "x": 4200965.160626411,
                "y": 172561.8451384772,
                "z": 4780139.036832627
            },
            {
                "x": 4085926.234503932,
                "y": 1200523.5192577157,
                "z": 4732512.821445564
            }
        ],
        "outCoordsXYZ": [
            {
                "x": 3508053.054934928,
                "y": 1797056.7521136273,
                "z": 4997264.453967082
            },
            {
                "x": 3398481.0991674634,
                "y": 1816506.4497522893,
                "z": 5065034.713350599
            },
            {
                "x": 3288289.553977938,
                "y": 1832114.2391253496,
                "z": 5131271.319292769
            },
            {
                "x": 3398481.0991674634,
                "y": 1816506.4497522893,
                "z": 5065034.713350599
            },
            {
                "x": 3288289.553977938,
                "y": 1832114.2391253496,
                "z": 5131271.319292769
            }
        ],
        "residualsXyz": [
            {
                "x": 1189475.6191961318,
                "y": -1225977.7211205405,
                "z": 1385353.3145901514
            },
            {
                "x": 226128.76410911093,
                "y": 421542.11879682774,
                "z": 1637681.6341067413
            },
            {
                "x": 1588598.0769089698,
                "y": -2382905.5446790694,
                "z": 1118452.6117110588
            },
            {
                "x": 1770725.439056876,
                "y": -2169026.084406709,
                "z": 962174.007328962
            },
            {
                "x": 1812337.9254727024,
                "y": -893674.3782352209,
                "z": 891889.9548261054
            }
        ],
        "residuals": [
            {
                "he": 1581461.7580723371,
                "a": 0.0,
                "n": -213666.16902381368,
                "e": -1376530.9004482846
            },
            {
                "he": 1579256.6970702903,
                "a": 0.0,
                "n": 600687.4183034925,
                "e": -40861.52702403441
            },
            {
                "he": 1581878.8301184308,
                "a": 0.0,
                "n": -702575.9703312702,
                "e": -2295149.264856861
            },
            {
                "he": 1582575.271515035,
                "a": 0.0,
                "n": -854194.6670350237,
                "e": -2113261.9235450616
            },
            {
                "he": 1582765.7282108767,
                "a": 0.0,
                "n": -908356.3981908383,
                "e": -1086702.4891745884
            }
        ]
    },
    "success": true
}