The Fortran name of this function is NhlFDataToNDC.
Given arrays containing the X and Y coordinates of points in data coordinate space, this function returns arrays containing the X and Y coordinates of the same points in NDC space.
#include <ncarg/hlu/hlu.h> #include <hfile for Transform class object> NhlErrorTypes NhlDataToNDC( int pid, float *x, float *y, int n, float *xout, float *yout, float *xmissing, float *ymissing, int *status, float *out_of_range )
subroutine NhlFDataToNDC(pid, x, y, n, xout, yout, xmissing, + ymissing, ixmissing, iymissing, status, + out_of_range, ierr) integer pid, n, ixmissing, iymissing, status, ierr float x(n), y(n), xout(n), yout(n), xmissing, ymissing, out_of_range
Type name: NhlTErrorTypes Definition: typedef enum _NhlErrType{ NhlFATAL = -4, /* "FATAL" */ NhlWARNING = -3, /* "WARNING" */ NhlINFO = -2, /* "INFO" */ NhlNOERROR = -1 /* "NOERROR" */ } NhlErrorTypes;
All objects that manage a data transformation have the ability to map points in data coordinate space to NDC points. You can use NhlDataToNDC function to perform this operation. It accepts one or more coordinate pairs and converts them. You may specify separate separate missing values for each axis. When NhlDataToNDC encounters a missing value in the input array, it does not attempt to transform it, but places it unmodified into the output array.
You must provide storage for the parameters xout and yout. The parameter n is the number of elements in the arrays x, y, xout and yout. NhlDataToNDC is implemented in such a way that you can use the same storage locations for the arrays x and xout, and for the arrays y and yout if you do not mind having the input values overwritten. If you do not want NhlDataToNDC to filter the input for missing values, then you should be careful to set both xmissing and ymissing to NULL.
The output parameter status is set to the value 1 if any of the input array coordinates are out-of-range across the transformation. It is set to 0 if all points (other than missing value points) were successfully transformed. The output parameter out_of_range is set to the value placed in the output array for any point that could not be transformed.
Value | Meaning --------+------------------------------------------------- NOERROR | function successful --------+------------------------------------------------- INFO | minor recoverable error --------+------------------------------------------------- WARNING | recoverable error --------+------------------------------------------------- FATAL | function failed; continuing the program | may result in core dump
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?