NAME

RcomputeExtend - compute (xUL,yUL) and nrRows, nrCols from some coordinates

SYNOPSIS

#include "csf.h"

void RcomputeExtend
(
	REAL8 *xUL,
	REAL8 *yUL,
	size_t *nrRows,
	size_t *nrCols,
	double x_1,
	double y_1,
	double x_2,
	double y_2,
	CSF_PT projection,
	REAL8 cellSize,
	double rounding
);

PARAMETERS

REAL8 *xUL
write-only, resulting xUL
REAL8 *yUL
write-only, resulting yUL
size_t *nrRows
write-only, resulting nrRows
size_t *nrCols
write-only, resulting nrCols
double x_1
first x-coordinate
double y_1
first y-coordinate
double x_2
second x-coordinate
double y_2
second y-coordinate
CSF_PT projection
required projection

Possible values for a

CSF_PT
are as follows: * these two can be returned by or passed to a csf2 function * this one CANNOT be returned by NOR passed to a csf2 function
REAL8 cellSize
required cellsize, > 0
double rounding
assure that (xUL/rounding), (yUL/rouding) (xLL/rounding) and (yLL/rounding) will will all be an integers values > 0

DESCRIPTION

RcomputeExtend computes parameters to create a raster maps from minimum and maximum x and y coordinates, projection information, cellsize and units. The resulting parameters are computed that the smallest raster map can be created that will include the two coordinates given, assuming a default angle of 0. Which coordinates are the maximum or minimum are determined by the function itself.