Great circle lines on a map

Mar 1, 2013 at 4:09 PM
Hello,

I have a question regarding the appearance of lines on a map. It seems logical that a line between two points on a map should be a great circle line, and should be appropriately drawn depending on the projection used. What I can see is that regardless of the projection, lines always appear as straight when rendered on the map. Is this the intended behavior, and is there a way I can get lines to appear as great circle lines?

Thanks
Coordinator
Mar 4, 2013 at 2:35 PM
Edited Mar 4, 2013 at 2:37 PM
Lines are defined by vertices. So if you line only has two end points then it will always appear as a straight line in any projection. However, if you line is defined by a series of vertices in one projection, then when you reproject, you may get a curved line. In the example below I drew two lines roughly between Los Angeles and New York using WGS84 GCS projection. One is defined by two points, and the other by a series of vertices. When I reproject the data into UTM NAD 83, Zone 14N, then you can see that one line is still straight but the other becomes curved.

Image

I hope this helps.
Mar 4, 2013 at 4:15 PM
Yes, thank you, I thought of that, but I was hoping that the rendering engine could handle it automatically, given only the two vertices of the line and a projection?
Developer
Mar 4, 2013 at 8:38 PM
The rendering engine only deals with one projection: the current map projection which all the layers on the map are in. It is only during reprojection that this issue comes up. Reprojection does not add or remove vertices from shapes, so you will need to add more vertices yourself before projecting if you want to see this kind of effect as Dan has shown above.

It would be interesting to come up with an alternative new reprojection method for shapefiles that automatically adds vertices while projecting. It could take a parameter, maybe a threshold angle for deciding when any adjacent segments form a smooth enough part of the new "curve." It could start by adding one vertex in the middle and keep doubling the number of segments by adding a vertex halfway between each until the projected version is "smooth enough."
Mar 4, 2013 at 11:56 PM
Edited Mar 5, 2013 at 5:57 AM
Thanks for the info. I have seen something like this in SkyView2 (an Aeronautical Information Management app, provided by Eurocontrol and developed by www.luciad.com). Whenever you draw a line on the map, it's not a straight line, but follows a great circle, and when you change the map projection, the lines are reprojected accordingly and shown again as great circle lines. Maybe there are some vertices added during calculations, but they are invisible to the user, who sees only the starting and the ending vertex and a curved line between them.
BTW, don't you think that this kind of behavior should be a default for a GIS?
Mar 5, 2013 at 7:52 AM
danames wrote:
Lines are defined by vertices. So if you line only has two end points then it will always appear as a straight line in any projection. However, if you line is defined by a series of vertices in one projection, then when you reproject, you may get a curved line. In the example below I drew two lines roughly between Los Angeles and New York using WGS84 GCS projection. One is defined by two points, and the other by a series of vertices. When I reproject the data into UTM NAD 83, Zone 14N, then you can see that one line is still straight but the other becomes curved.

Image

I hope this helps.
Actually, what I was trying to achieve is not quite like your example. If I was to draw a line between LA and NY using WGS84 projection, I would expect the line itself to appear curved to the north, to follow the great circle line. If you define a straight line ON THE SCREEN between LA and NY using WGS84, and put more intermediate vertices on it, that wouldn't be the shortest line between the two points, and also wouldn't reproject correctly as a great circle line in other projections, just as in your example you're not getting a great circle line when reprojecting. That could be achieved, but only if you draw the original line in a gnomonic projection, which projects a great circle as a straight line.
Mar 5, 2013 at 8:27 AM
danames wrote:
Lines are defined by vertices. So if you line only has two end points then it will always appear as a straight line in any projection. However, if you line is defined by a series of vertices in one projection, then when you reproject, you may get a curved line. In the example below I drew two lines roughly between Los Angeles and New York using WGS84 GCS projection. One is defined by two points, and the other by a series of vertices. When I reproject the data into UTM NAD 83, Zone 14N, then you can see that one line is still straight but the other becomes curved.

Image

I hope this helps.
Actually, what I was trying to achieve is not quite like your example. If I was to draw a line between LA and NY using WGS84 projection, I would expect the line itself to appear curved to the north, to follow the great circle line. If you define a straight line ON THE SCREEN between LA and NY using WGS84, and put more intermediate vertices on it, that wouldn't be the shortest line between the two points, and also wouldn't reproject correctly as a great circle line in other projections, just as in your example you're not getting a great circle line when reprojecting. That could be achieved, but only if you draw the original line in a gnomonic projection, which projects a great circle as a straight line.
Mar 5, 2013 at 8:50 AM
danames wrote:
Lines are defined by vertices. So if you line only has two end points then it will always appear as a straight line in any projection. However, if you line is defined by a series of vertices in one projection, then when you reproject, you may get a curved line. In the example below I drew two lines roughly between Los Angeles and New York using WGS84 GCS projection. One is defined by two points, and the other by a series of vertices. When I reproject the data into UTM NAD 83, Zone 14N, then you can see that one line is still straight but the other becomes curved.

Image

I hope this helps.
Actually, what I was trying to achieve is not quite like your example. If I was to draw a line between LA and NY using WGS84 projection, I would expect the line itself to appear curved to the north, to follow the great circle line. If you define a straight line ON THE SCREEN between LA and NY using WGS84, and put more intermediate vertices on it, that wouldn't be the shortest line between the two points, and also wouldn't reproject correctly as a great circle line in other projections, just as in your example you're not getting a great circle line when reprojecting. That could be achieved, but only if you draw the original line in a gnomonic projection, which projects a great circle as a straight line.