NCL Home > Documentation > HLUs > API

NhlDataToNDC

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.


C Synopsis

#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 
		)

Fortran Synopsis

      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

Arguments

pid (input)
Id of a Transform class plot object with an established data transformation.
x (input)
Array of X-Axis coordinates values in data coordinate space.
y (input)
Array of Y-Axis coordinates values in data coordinate space.
n (input)
Number of elements in each of the arrays x, y, xout and yout.
xout (output)
Array for X-Axis output values in NDC space. The user is responsible for providing the appropriate amount of storage.
yout (output)
Array for Y-Axis output values in NDC space. The user is responsible for providing the appropriate amount of storage.
xmissing (input)
Missing value for the X-Axis input array. In C, it should be a pointer to this value, and if it is NULL then no missing values exist in the input data.
ymissing (input)
Missing value for the Y-Axis input array. In C, it should be a pointer to this value, and if it is NULL then no missing values exist in the input data.
ixmissing (input, Fortran only)
Flag for whether or not any missing values exist for the X-Axis input array; if 1, then missing values exists.
iymissing (input, Fortran only)
Flag for whether or not any missing values exist for the Y-Axis input array; if 1, then missing value exists.
status (output)
Result code of the transformation: 1 if any input array value maps to an out-of-range value; 0 otherwise (in C, it should be a pointer to this value).
out_of_range (output)
Value used in the output array for any input coordinate values that map to an out-of-range value (in C, it should be a pointer to this value).
ierr (output, Fortran only)
Error code.

Types

Type name:		NhlTErrorTypes
Definition:
typedef enum _NhlErrType{
	NhlFATAL	= -4,	/* "FATAL"	*/
	NhlWARNING	= -3,	/* "WARNING"	*/
	NhlINFO		= -2,	/* "INFO"	*/
	NhlNOERROR	= -1	/* "NOERROR"	*/
} NhlErrorTypes;