[PROJ] Migrating from PROJ 7 to 8
Torsten Martinsen
tma at gatehouse.com
Thu May 12 03:06:48 PDT 2022
Hi,
I have some code (written by a previous coworker) that uses the functions pj_ctx_alloc(), pj_init_plus_ctx(), and pj_fwd(). These have been deprecated for some time and were removed in PROJ 8.
I have searched the documentation etc., and while it is quite simple to figure out the current equivalents for the two first functions, I cannot figure out the replacement for pj_fwd().
For reference, the code in question is in essence:
void projection::forward(double& x, double&y) const
{
projUV p;
p.u = x * geo::deg_to_rad;
p.v = y * geo::deg_to_rad;
p = pj_fwd(p, proj_);
x = p.u * geo::rad_to_deg;
y = p.v * geo::rad_to_deg;
}
where 'proj_' is returned from pj_init_plus_ctx().
Regards,
Torsten Martinsen
More information about the PROJ
mailing list