NAME

RasterCoords2RowCol - compute (fractional) row, column index from true world co-ordinate.

SYNOPSIS

#include "csf.h"

void RasterCoords2RowCol
(
	const CSF_RASTER_LOCATION_ATTRIBUTES *m,
	double x,
	double y,
	double *row,
	double *col
);

PARAMETERS

const CSF_RASTER_LOCATION_ATTRIBUTES *m
Not Documented.
double x
x of true co-ordinate
double y
y of true co-ordinate
double *row
write-only. Row index (y-pos). floor(row) is row number, if (row >= 0) then fmod(row, 1) is in-pixel displacement from pixel-top, if (row <0) then fmod(row, 1) is in-pixel displacement from pixel-bottom.
double *col
write-only. Column index (x-pos). floor(col) is column number, if (col >= 0) then fmod(col, 1) is in-pixel displacement from pixel-left, if (col <0) then fmod(col, 1) is in-pixel displacement from pixel-right.

DESCRIPTION

RasterCoords2RowCol computes row, column index from true world co-ordinate. The row and column co-ordinate are returned as fractions (See parameters section). The x,y co-ordinate don't have to be on the map. They are just relative to upper left position.

RETURNS

0 if the co-ordinate is outside the map, 1 if inside, -1 in case of an error

MERRNO

ILL_CELLSIZE

SEE ALSO

Rcoords2RowCol , RgetRowCol