(Fwd) [GRASS-dev] Change the resolution in the output map
Michael Barton
michael.barton at asu.edu
Mon Dec 3 13:17:08 EST 2007
Juan,
Why don't you just use one of the several resampling methods built into
GRASS instead of writing something in C?
r.resample
r.resample.stats
r.resample.interp
r.resample.rst
Michael
On 12/3/07 3:13 AM, "Juan Diego Giraldo Osorio" <Juan.Giraldo at upct.es>
wrote:
>
> Hi coworkers
>
> I have received an answer to my question from Glynn, but I erased it and
> I haven't realized. I ask send me the answer again please.
>
> Thanks
>
> Juan
>
> --
> ********************************
> Juan Diego Giraldo Osorio
> Tel. 968 327 047
> Departamento de Ingeniería Térmica y de Fluidos
> Universidad Politécnica de Cartagena
> España
> ********************************
>
>
> ---------- Mensaje reenviado ----------
> Para: grass-dev at grass.itc.it
> Asunto: [GRASS-dev] Change the resolution in the output map
> De: "Juan Diego Giraldo Osorio"<Juan.Giraldo at upct.es>
> Fecha: Fri, 30 Nov 2007 17:22:18 +0100 (CET)
>
> Hi coworkers
>
> I'm working with grass62. I'm triying to create a raster map with finer
> resolution from another with coarse resolution. The problem is the next:
>
> - My coarse resolution map (input map) have 500 m of resolution, with
> 1000x1000 rows*cols. This information is the same as the current region.
> - I want to create a finer resolution map (output map) with 100 m of
> resolution, with 5000x5000 rows*cols.
> - I have been trying with the next code:
>
> /* Adjust the region to new resolution */
> region.rows = nsubpixel*nrows;
> region.cols = nsubpixel*ncols;
> region.format = 0;
> region.compressed = 1;
> G_adjust_Cell_head( ®ion , 1 , 1 );
> G_set_window(®ion);
>
> nsubpixel is 5 (500/100), and I'm writing a new header file with this
> new information (region.rows=5000, region.cols=5000, region.ew_res=100,
> region.ns_res=100) but when I read the new map, the next message error
> is shows:
>
> WARNING: error reading null row 115
> ... a lot of times.
>
> Thanks for your help.
>
> Juan Diego Giraldo
> --
> ********************************
> Juan Diego Giraldo Osorio
> Tel. 968 327 047
> Departamento de Ingeniería Térmica y de Fluidos
> Universidad Politécnica de Cartagena
> España
> ********************************
>
>
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>
>
>
>
__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
More information about the grass-dev
mailing list