[GRASSLIST:5208] RE: g.region help
John Gillette
JGillette at rfmd.com
Tue Dec 10 17:47:38 EST 2002
A quick check of main.c for r.in.arc looks like it is supposed
to set the "active region" from information in the header
of the input file. It also uses the number of rows and columns
from the header to read in the data.
Are you sure the raster file size changed?
John
(Can a developer check me here?)
----------------------------------------
if(!gethead (fd, &cellhd, &missingval)) <-- get header
info using gethead.c
{
fprintf (stderr, "Can't proceed\n");
exit(1);
}
nrows = cellhd.rows; <-- number of
rows from header
ncols = cellhd.cols; <-- number of
columns from header
if(G_set_window (&cellhd) < 0) <-- set "active
region" to info from header
(term used in
Grass programming manual)
exit(3);
if (nrows != G_window_rows()) <- double check that
rows from header equal
the new active region
{
fprintf (stderr, "OOPS: rows changed from %d to %d\n", nrows, G_window_rows());
exit(1);
}
if (ncols != G_window_cols()) <-- double check columns
{
fprintf (stderr, "OOPS: cols changed from %d to %d\n", ncols, G_window_cols());
exit(1);
}
---------------------------------------------
> -----Original Message-----
> From: Kevin Slover [mailto:Kevin.Slover at noaa.gov]
> Sent: Tuesday, December 10, 2002 1:08 PM
> To: grass-list
> Subject: [GRASSLIST:5206] g.region help
>
>
> I am having a bit of a dilemma, and I am sure there is any easy way to
> resolve it...I hope...
>
> I am currently importing what will soon be 4000+ arcview grid files
> using the r.in.arc command. However, the raster produced
> encompases the
> entire pre-set region. Is it possible to set the region via the input
> file? I know there is a g.region rast=<filename>, but the raster must
> already be present...Any ideas?
> --
> LTJG Kevin Slover, NOAA
> GIS Specialist/Oceanographer
> NOAA/TPC/TSB/Storm Surge Unit
> 11691 SW 17th Street
> Miami FL 33165
>
> W (305) 229-4456
>
>
More information about the grass-user
mailing list