api.radiantdrift.com
  • Radiant Drift API
    • Subscription Plans
    • Educational Use and Research
    • API End Points
  • Getting Started
    • About your account
    • Request Authentication
    • Managing API Keys
    • OpenAPI Specification
    • Date/Time Format
    • Validity, Accuracy, and Precision
  • Usage Guidelines
    • Acceptable Use Policy
    • Usage Credits and Call Costs
    • Attribution
    • Rate Limits
  • Julian Day
  • Delta-T
  • Rise, Transit, Set Times
  • Body Position
    • Request Parameters
    • Position at a given time
    • Positions for a time range
    • Observer location
  • Solar Eclipses
    • Embeddable Web Widgets
      • Eclipse Map
      • Eclipse Simulator
    • Besselian Elements
    • Local Circumstances
    • Eclipse Paths
    • Five Millennium Canon of Solar Eclipses
  • The Moon
    • Lunar Libration
    • Lunar Limb Profile
  • Geospatial
    • Geodesic
    • Elevation
  • Reference
    • Definitions
    • Errors
Powered by GitBook
On this page
  1. Geospatial

Geodesic

Calculate points along an arbitrary great circle

PreviousGeospatialNextElevation

Last updated 12 months ago

This API is available on the Pro plan or higher

The /geodesicend point calculates and returns points along the great circle connecting two points, start and end.

Two methods are available:

  • midpoint: the points are calculated recursively, by finding the mid-point of the current coordinate pair, beginning with start and end, repeating the great circle calculation and then testing the difference in bearing. This is repeated until the difference is less than the specified tolerance, in degrees. A lower tolerance results in a greater number of points

  • uniform: the distance is calculated from start to end and then divided to give the specific number of segments. A great circle calculation is performed from the start point along the initial bearing (also known as forward azimuth) to the end point for the calculated distance, and then repeated as necessary for each segment

The end point can return either an array of points or a valid geojson object. You may specify the desired ellipsoid to be used for the calculations

Elevation

You can request that the API return the elevation at each calculated point along the geodesic using the with-el parameter. For details of the elevation data source, see the end point documentation.

Requesting elevation values increases both the response time and call cost.

Elevation

Calculate points along geodesic path from start to end point

get
Authorizations
Path parameters
startstringRequired

Comma-separated values for latitude, longitude (negative west) in decimal degrees.

Example: 37.6,-122.3
endstringRequired

Comma-separated values for latitude, longitude (negative west) in decimal degrees.

Example: 35.6,-3
Query parameters
methodstring · enumRequired

Computation method

Example: midpointPossible values:
formatstring · enumRequired

Desired output format.

Example: arrayPossible values:
with-elnumberOptional

Include elevation data in the results (incurs higher call cost)

Default: 0Example: 1
ellipsoidstring · enumOptional

Earth ellipsoid model (defaults to WGS84)

Default: WGS84Example: WGS84Possible values:
tolerancenumber · min: 0.05 · max: 1.5Optional

Calculation tolerance in degrees. Required if method is 'midpoint'

Example: 0.05
segmentsnumberOptional

Number of segments. Required if method is 'uniform'

Example: 10
Responses
200Success
application/json
4XX
Not Found
application/json
get
GET /geodesic/{start}/{end} HTTP/1.1
Host: api.radiantdrift.com
Accept: */*
{
  "query": {
    "name": "geodesic",
    "start": {
      "lat": 37.6,
      "lng": -122.3
    },
    "end": {
      "lat": 35.6,
      "lng": -3
    },
    "method": "midpoint",
    "tolerance": 1.24904737,
    "distance": 2.82842712,
    "ellipsoid": "WGS84",
    "ellipsoid-properties": {
      "semiMajorAxis": 6378137,
      "semiMinorAxis": 6356752.31424518,
      "flattening": 0.00335281,
      "inverseFlattening": 298.25722356,
      "flatFn": 0.00669438,
      "funSq": 0.99330562
    },
    "curve": {
      "ellipsoidalDistance": 9774806.02878448,
      "forwardAzimuth": 45.16907778,
      "reverseAzimuth": 316.2814646
    },
    "with-el": false,
    "cost": 82
  },
  "response": [
    [
      -122.3,
      37.6
    ],
    [
      -121.057243,
      38.563587
    ],
    [
      -119.78109,
      39.513468
    ],
    [
      -118.469973,
      40.448804
    ],
    [
      -117.122301,
      41.368704
    ],
    [
      -115.736468,
      42.272229
    ],
    [
      -114.310869,
      43.158386
    ],
    [
      -112.843904,
      44.02613
    ],
    [
      -111.334004,
      44.874356
    ],
    [
      -109.779641,
      45.701907
    ],
    [
      -108.179355,
      46.507565
    ],
    [
      -106.531777,
      47.29006
    ],
    [
      -105.689857,
      47.672208
    ],
    [
      -104.835658,
      48.048062
    ],
    [
      -103.969046,
      48.41745
    ],
    [
      -103.089901,
      48.780192
    ],
    [
      -102.198116,
      49.13611
    ],
    [
      -101.293596,
      49.48502
    ],
    [
      -100.376264,
      49.826735
    ],
    [
      -99.446059,
      50.161069
    ],
    [
      -98.502935,
      50.487831
    ],
    [
      -97.54687,
      50.806829
    ],
    [
      -96.57786,
      51.117868
    ],
    [
      -95.595922,
      51.420754
    ],
    [
      -94.6011,
      51.715292
    ],
    [
      -93.593458,
      52.001283
    ],
    [
      -92.573091,
      52.278533
    ],
    [
      -91.540118,
      52.546843
    ],
    [
      -90.494686,
      52.80602
    ],
    [
      -89.436975,
      53.055869
    ],
    [
      -88.367192,
      53.296197
    ],
    [
      -87.285578,
      53.526815
    ],
    [
      -86.192405,
      53.747535
    ],
    [
      -85.087978,
      53.958174
    ],
    [
      -83.972635,
      54.158552
    ],
    [
      -82.846748,
      54.348497
    ],
    [
      -81.710723,
      54.527837
    ],
    [
      -80.564999,
      54.696411
    ],
    [
      -79.410046,
      54.854063
    ],
    [
      -78.24637,
      55.000644
    ],
    [
      -77.074505,
      55.136013
    ],
    [
      -75.895017,
      55.260038
    ],
    [
      -74.708502,
      55.372596
    ],
    [
      -73.51558,
      55.473576
    ],
    [
      -72.316898,
      55.562873
    ],
    [
      -71.113127,
      55.640397
    ],
    [
      -69.904957,
      55.706067
    ],
    [
      -68.693098,
      55.759815
    ],
    [
      -67.478273,
      55.801583
    ],
    [
      -66.261219,
      55.831328
    ],
    [
      -65.042684,
      55.849019
    ],
    [
      -63.823419,
      55.854636
    ],
    [
      -62.604181,
      55.848173
    ],
    [
      -61.385725,
      55.829637
    ],
    [
      -60.168804,
      55.799048
    ],
    [
      -58.954163,
      55.756439
    ],
    [
      -57.742538,
      55.701854
    ],
    [
      -56.534654,
      55.635351
    ],
    [
      -55.331217,
      55.556999
    ],
    [
      -54.132917,
      55.46688
    ],
    [
      -52.940423,
      55.365086
    ],
    [
      -51.75438,
      55.25172
    ],
    [
      -50.575408,
      55.126897
    ],
    [
      -49.404099,
      54.990738
    ],
    [
      -48.241016,
      54.843377
    ],
    [
      -47.086694,
      54.684955
    ],
    [
      -45.941634,
      54.515621
    ],
    [
      -44.806305,
      54.335532
    ],
    [
      -43.681145,
      54.144852
    ],
    [
      -42.566555,
      53.943748
    ],
    [
      -41.462906,
      53.732397
    ],
    [
      -40.370533,
      53.510978
    ],
    [
      -39.289739,
      53.279674
    ],
    [
      -38.220795,
      53.038672
    ],
    [
      -37.163937,
      52.788164
    ],
    [
      -36.119373,
      52.528341
    ],
    [
      -35.087278,
      52.259397
    ],
    [
      -34.067799,
      51.981529
    ],
    [
      -33.061053,
      51.694932
    ],
    [
      -32.067131,
      51.399803
    ],
    [
      -31.086099,
      51.09634
    ],
    [
      -30.117995,
      50.784736
    ],
    [
      -29.162837,
      50.465189
    ],
    [
      -28.22062,
      50.13789
    ],
    [
      -27.291318,
      49.803033
    ],
    [
      -26.374886,
      49.460807
    ],
    [
      -25.471261,
      49.1114
    ],
    [
      -24.580364,
      48.754998
    ],
    [
      -23.702101,
      48.391784
    ],
    [
      -22.836363,
      48.021938
    ],
    [
      -21.983028,
      47.645637
    ],
    [
      -21.141964,
      47.263055
    ],
    [
      -19.496065,
      46.479726
    ],
    [
      -17.897411,
      45.67328
    ],
    [
      -16.344631,
      44.844985
    ],
    [
      -14.83626,
      43.996055
    ],
    [
      -13.370772,
      43.127649
    ],
    [
      -11.946592,
      42.240865
    ],
    [
      -10.562124,
      41.33675
    ],
    [
      -9.215759,
      40.416294
    ],
    [
      -7.905893,
      39.480434
    ],
    [
      -6.630937,
      38.530059
    ],
    [
      -5.389322,
      37.566006
    ],
    [
      -4.17951,
      36.589071
    ],
    [
      -3,
      35.6
    ]
  ]
}
  • Elevation
  • GETCalculate points along geodesic path from start to end point