[GRASS-dev] c code: access region/window yllcorner and xllcorner values

Glynn Clements glynn at gclements.plus.com
Tue Apr 29 11:59:42 EDT 2008


Yann Chemin wrote:

> I am trying make a module to (among other things) export a flow
> direction map in a specific ascii format.
> 
> I need to access the region or window xllcorner and yllcorner, right now,
> the only code I found was to access cellhd.xxx variables:
> 
>  xmin=cellhd.west;
>  xmax=cellhd.east;
>  ymin=cellhd.south;
>  ymax=cellhd.north;
> 
> which is not exactly my need since the xllcorner and yllcorner are
> going to be part of the header of the new ascii file, where pixels
> will be extracted from within the region limits.

	struct Cell_head cellhd;
	G_get_window(&cellhd);
	xllcorner=cellhd.west;
	yllcorner=cellhd.south;

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list