[PROJ] Ellipsoidal orthographic: condition of projectability ?
Charles Karney
charles at karney.com
Sat Sep 26 05:00:40 PDT 2020
The visibility condition is simple:
Just take the dot product of the normal to the ellipsoid
[cos(phi)*cos(lambda), cos(phi)*sin(lambda), sin(phi)]
at the center of the projection and at the test point.
Positive = visible; zero = horizon; negative = hidden.
This is the same as the spherical formula. But I hope that this
formulation explains why.
--Charles
On 9/26/20 6:31 AM, Even Rouault wrote:
> Hi,
>
> In https://github.com/OSGeo/PROJ/pull/2361, I've implemented the
> ellipsoidal formulation of the orthographic projection from the formulas
> from EPSG guidance note 7-2, but one missing piece is the condition of
> projectability.
>
> In the spherical formulation, there is a test to check that a given
> (lam, phi) is visible from the projection plane or not.
>
> https://github.com/rouault/PROJ/blob/2e104e092578347de11208e9a3a80a3bf711265d/src/projections/ortho.cpp#L53
>
> It seems it comes from https://pubs.usgs.gov/pp/1395/report.pdf equation
> (5-3), page 149
>
> Looking at the formula, one can observe that it is actually the
> (opposite of the) partial derivative of y(lam, phi, phi0) with respect
> to phi0.
>
> But perhaps this is just a coincidence due to the spherical case.
>
> Now, the question... What about the ellipsoidal case:
>
> - Should the exact same formula (Q->sinph0 * sinphi + Q->cosph0 * cosphi
> * coslam < - EPS10) of the spherical case be used as well ?
>
> - Or should we compute the partial derivative of y(lam, phi, phi0) with
> respect to phi0 with the ellipsoidal formula of y from
>
> https://github.com/rouault/PROJ/blob/2e104e092578347de11208e9a3a80a3bf711265d/src/projections/ortho.cpp#L136
> (will not be pretty...)
>
> - something else ?
>
> Even
>
More information about the PROJ
mailing list