PDL-Transform-Proj4
view release on metacpan or search on metacpan
lib/PDL/Transform/Proj4.pd view on Meta::CPAN
);
}
wrap_code('fwd_transform', 'lonlat', 'xy', 1);
wrap_code('inv_transform', 'xy', 'lonlat', 0);
# Utility functions for getting projection description information (in a general case).
pp_addxs('', <<'ENDXS' );
void
proj_version(...)
PPCODE:
EXTEND(sp, 3);
mPUSHu(PROJ_VERSION_MAJOR);
mPUSHu(PROJ_VERSION_MINOR);
mPUSHu(PROJ_VERSION_PATCH);
# returns input_units, output_units
void
units(proj_str)
char *proj_str
PPCODE:
PJ *proj = proj_create( NULL, proj_str ); /* Init the projection */
if (!proj)
croak("Failed to create PJ from '%s': %s", proj_str, proj_errno_string(proj_errno(proj)));
EXTEND(sp, 2);
char *input_u = proj_angular_input(proj, PJ_FWD) ||
proj_degree_input(proj, PJ_FWD) ? "degrees" : "metres";
char *output_u = proj_angular_output(proj, PJ_FWD) ||
proj_degree_output(proj, PJ_FWD) ? "degrees" : "metres";
mPUSHs(newSVpv(input_u, 0));
mPUSHs(newSVpv(output_u, 0));
( run in 0.423 second using v1.01-cache-2.11-cpan-5511b514fd6 )