PROJ icon indicating copy to clipboard operation
PROJ copied to clipboard

Missing proj_geod_direct method

Open vmirgorod opened this issue 6 months ago • 2 comments

There is proj_geod method but lack of paired proj_geod_direct method, utilizing low level geod_direct function. Is is possible to include it implementation to public API?

PJ_COORD proj_geod_direct(const PJ *P, PJ_COORD a, double azimuth, double distance) {
    if (!P->geod) {
        return proj_coord_error();
    }
    
    double lat = 0, lon = 0, azi = 0;
    geod_direct(P->geod, PJ_TODEG(a.lpz.phi), PJ_TODEG(a.lpz.lam), PJ_TODEG(azimuth), distance, &lat, &lon, &azi);
    
    return proj_coord(PJ_TORAD(lon), PJ_TORAD(lat), 0, 0);
}

vmirgorod avatar Jun 15 '25 15:06 vmirgorod

@vmirgorod That would be a welcome addition. Can you submit a pull request for that ?

rouault avatar Jun 15 '25 16:06 rouault

@rouault, Thank you, will do it

vmirgorod avatar Jun 15 '25 16:06 vmirgorod