NAME
Rcoords2RowCol - compute (fractional) row, column index from true world co-ordinate.
SYNOPSIS
#include "csf.h"
int Rcoords2RowCol
(
const MAP *m,
double x,
double y,
double *row,
double *col
);
PARAMETERS
-
const MAP *m
-
map handle
-
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
Rcoord2RowCol 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
RasterCoords2RowCol
,
RgetRowCol