Hello everyone,
I would like to know if there’s a GRASS function that returns the cells area in a raster map.
Regards,
Roberto
Inviato da Yahoo! Mail.
La casella di posta intelligente.
Hello everyone,
I would like to know if there’s a GRASS function that returns the cells area in a raster map.
Regards,
Roberto
Inviato da Yahoo! Mail.
La casella di posta intelligente.
Yes, there is. You forgot to say where You need it - in C code, script?
G_area_of_cell_at_row(row); [1]
Maris.
1. http://download.osgeo.org/grass/grass6_progman/gis_2area_8c.html#0f6fbb86c2dc8fa911eb52dc4875aab3
2008/4/10, roberto caselli <roberto.caselli@yahoo.it>:
Hello everyone,
I would like to know if there's a GRASS function that returns the cells area
in a raster map.Regards,
Roberto________________________________
Inviato da Yahoo! Mail.
La casella di posta intelligente._______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Thank you Maris, I’m working on a C++ module.
Maris Nartiss maris.gis@gmail.com ha scritto:
Yes, there is. You forgot to say where You need it - in C code, script?
G_area_of_cell_at_row(row); [1]
Maris.
2008/4/10, roberto caselli
Inviato da Yahoo! Mail.
La casella di posta intelligente.
Sorry for this silly question but I have a doubt now: Can an elevation raster map have cells with different areas? I though that all cells in a map had the same sizes…
Maris Nartiss maris.gis@gmail.com ha scritto:
Yes, there is. You forgot to say where You need it - in C code, script?
G_area_of_cell_at_row(row); [1]
Maris.
2008/4/10, roberto caselli
Inviato da Yahoo! Mail.
La casella di posta intelligente.
roberto caselli wrote:
Sorry for this silly question but I have a doubt now: Can an elevation
raster map have cells with different areas? I though that all cells in
a map had the same sizes...
All cells have the same dimensions measured in the location's
coordinate system.
However, for lat/lon data, each cell will have fixed dimensions in
degrees, but it's physical area will vary with latitude.
This is why G_area_of_cell_at_row() takes the row as an argument.
For projected data, it returns a constant value based upon the
region's resolution and the location's units (metres, feet, etc). For
lat-lon data, the conversion takes into account the row's latitude and
the location's ellipsoid.
Also, note that G_begin_cell_area_calculations() must be called to
initialise the conversion parameters prior to calling
G_area_of_cell_at_row().
--
Glynn Clements <glynn@gclements.plus.com>