Clarification for project
|Affected version:||5.1.x||Platform:||Mac OS X|
I am reporting back on something that stumped me in using gmt project. I noticed this issue when using the -G generate mode. The model uses -C to define the center of the projection, which is defined where p,q = 0,0. However, I find that when I specify a length for small circle, using -L and -Q, the length is defined as if the center is at the oblique equator. Of course, -G does not work for a small circle unless the colatitude is appended to the -G option.
I include an example below to demonstrate this issue. My opinion is that it would be better for the user to follow the concepts associated with a map projection. As such, I view the oblique projection provided by project to be defined relative to a central oblique meridian and a central oblique parallel. My intuition suggests that -C defines the lon, lat point where those two features cross. Alternatively, maybe -C is meant to mean the start of a path, in which case, it is no longer relevant to the center or origin of the projection.
#2 Updated by Mark about 2 years ago
Some years have gone by, but I have found the same problem again as documented here in Bug #828. I did a poor job explaining the problem last time around.
To start, my objective is to draw a small circle relative to a pole given by -T, with a length given by -L, an origin given by -C, and an increment and colatitude given by -G. Using the -Q option, the -L values (lMin and lMax) are defined as distances along the small circle path relative to the origin (-C).
The attached script and pdf show two example plots. Note that this stereographic plot has a latitude range from -15 to +90 degrees, with grid increments every 15 degrees.
The first plot example is a great circle (colatitude 90 degrees) with a half circle superimposed in red.
The half circle has -L1e4/-1e4 (-Q is set so the units are km), which means that the red line should extend from -90 to +90 degrees in longitude. This example does in fact work. Background: we know that a full great circle for the earth = 4e4 km, thanks to the French.
The problem shows up in the second example, which is a small circle at latitude 45 degrees. Note that the distance along the small circle is specified the same as before, with -L1e4/-1e4 (-Q is set so the units are once again in km). And the small circle spans from -90 to +90 degrees as before. But the distance along this small circle is actually -L=-7071/7071 in kilometers. The distance specified by -L should give a small circle path larger than a half circle.
The bug seems to be that the project function is calculating the distance at the projection equation and not along the specified small circle path. In other words, there is a missing factor = sin(colatitude) for the -L parameters.
#3 Updated by Mark about 2 years ago
I should have mentioned: I am now using GMT 5.4.3 and Mac OS 10.14.2
One other comment: It seems odd that this small circle calculation requires specification of the colatitude (-G).
The colatitude is already fully determined by the point specified in the -C option. I would recommend removing the colatitude option in -G, unless there is some other factor that I am not recognizing.