| 81 | |
| 82 | |
| 83 | PJ *PROJECTION(ccon) { |
| 84 | |
| 85 | struct pj_opaque *Q = static_cast<struct pj_opaque*>(calloc (1, sizeof (struct pj_opaque))); |
| 86 | if (nullptr==Q) |
| 87 | return pj_default_destructor (P, PROJ_ERR_OTHER /*ENOMEM*/); |
| 88 | P->opaque = Q; |
| 89 | P->destructor = destructor; |
| 90 | |
| 91 | Q->phi1 = pj_param(P->ctx, P->params, "rlat_1").f; |
| 92 | if (fabs(Q->phi1) < EPS10) |
| 93 | { |
| 94 | proj_log_error(P, _("Invalid value for lat_1: |lat_1| should be > 0")); |
| 95 | return destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); |
| 96 | } |
| 97 | if (!(Q->en = pj_enfn(P->es))) |
| 98 | return destructor(P, PROJ_ERR_OTHER /*ENOMEM*/); |
| 99 | |
| 100 | Q->sinphi1 = sin(Q->phi1); |
| 101 | Q->cosphi1 = cos(Q->phi1); |
| 102 | Q->ctgphi1 = Q->cosphi1/Q->sinphi1; |
| 103 | |
| 104 | |
| 105 | P->inv = ccon_inverse; |
| 106 | P->fwd = ccon_forward; |
| 107 | |
| 108 | return P; |
| 109 | } |
| 110 | |
| 111 |
nothing calls this directly
no test coverage detected