6 #define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
10 _printf_(
" type help CoordTransform\n");
22 printf(
"%i %i %i %i\n",
NLHS,nlhs,
NRHS,nrhs);
33 if(!M*N)
_error_(
"no coordinate provided");
34 if(test1!=M)
_error_(
"x and y do not have the same size");
35 if(test2!=N)
_error_(
"x and y do not have the same size");
40 double* xout = xNew<double>(M*N);
41 double* yout = xNew<double>(M*N);
44 projPJ pj_src = pj_init_plus(projin);
45 projPJ pj_dst = pj_init_plus(projout);
46 if(!pj_src)
_error_(
"Failed to initialize PROJ with source projection\n");
47 if(!pj_dst)
_error_(
"Failed to initialize PROJ with destination projection\n");
50 int p = pj_transform(pj_src,pj_dst,M*N,1,xout,yout,NULL);
52 _error_(
"PROJ failed with error code: "<<p);
64 xDelete<double>(xout);
65 xDelete<double>(yout);
66 xDelete<char>(projin);
67 xDelete<char>(projout);