0

Trips on the globe

I have a large number of trips, each containing one to five stops from origin to destination. Each stop is given with geo coordinates.

Target projection

I would like to transform all trips to a Cartesian system so that:

  • Origin is in 0,0
  • Destination is in 1,0
  • the relative distance of all other stops of each trip to origin and destination is kept

How can I achieve this?

  • Is there a standard way to do this kind of transformation?
  • If yes: Does it have an established name?
  • Is there a similar transformation with an established name (and algorithm/implementation)?
  • Can you recommend packages in Python or R to do this?

Background

I want to use this transformation for a plot to get insights in the general shape of the trips.

1

You could try using azimuthal equidistant, where the projection center is the origin. Distances are maintained from the center point so you'll have some distortion in the intermediate steps.

There's not an easy way to set the target point to 1,0 though. Possibly try using two-point equidistant, or rectified skew orthomorphic (RSO). Depending on the software you use, it might be called (Hotine) oblique Mercator. Some versions allow setting the central line based on two points. You could play with the alpha and gamma parameters if you want the source/destination points to be on a "horizontal" line. Alpha is an azimuth--you don't have to set it if you can use two points for the central line. Gamma rotates the resulting projection surface. Often gamma (xy rotation angle in ArcGIS) is used to align geodetic North with grid (projection) North.

  • Thanks for the input and the mentions of the relevant terms. It's rather encouraging to read that the problem is not trivial. I have another idea now which I describe in another answer so that others can edit and comment. I will try to update my progress, if I succeed. Btw. great podcast! – mondano Jun 1 '17 at 7:28
1

The following procedure seems to fit the problem:

1. Transform all trips in a way that origin and destination are "on the equator" of the globe.

This is done to avoid the later distortion when applying Mercator transformation. It is important to do this in a way that origin is always on the same side of destination, e.g. left.

This seems to be the hardest part in the implementation. An according rotation matrix needs to be derived.

2. Perform Mercator transformation to get it on a 2d plane

Technically probably any other transformation is good, too. Are there any transformations especially apt for near-equator points?

3. Calculate the resize factor necessary to have a distance of 1 between origin an destination

4. Resize all distances so that the distance between origin and destination is 1

The trip lengths between intermediate stops are resized accordingly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.