[GRASS-user] Understanding Raster Map Input Files

Moritz Lennert mlennert at club.worldonline.be
Fri Aug 31 02:07:00 PDT 2018


Hi Vidura,

First of all, please keep discussions on the list.

On 31/08/18 09:48, Vidura Dantanarayana wrote:
> Hi Moritz,
> 
> Really appreciate your help as we are facing this problem for some days 
> now. First I'm a beginner user. Can you explain what are the categories 
> and how those used in GRASS GIS? 

GRASS GIS is an extremely wonderful and powerful tool, but it does need 
some initial learning in order to understand how to use it. Just 
answering the questions below will not provide that for you.

I would suggest that you go through some of the basic introductory 
material, just in order to get a feeling for GRASS GIS, before attacking 
your specific problem.

You could have a look at the following resources (at least for their 
introductory parts):

- https://grass.osgeo.org/grass74/manuals/helptext.html
- https://grass.osgeo.org/grass74/manuals/rasterintro.html
- https://grass.osgeo.org/grass74/manuals/vectorintro.html
- 
https://grasswiki.osgeo.org/wiki/From_GRASS_GIS_novice_to_power_user_(workshop_at_FOSS4G_Boston_2017)
- 
http://www.training.gismentors.eu/isprs-summer-school-2016/lesson1/grass-gis.html

Or search for "GRASS GIS" in YouTube for some videos.

> Let's say I need to create custom 
> 1hour_moisture (or any other file), so how can I create these files?

How you create these files depends on the data that you have as input.

If you look at the metadata of the file in the demolocation 
(right-click->Metadata or 'r.info 1hour_moisture' you will this 
information at the end:

|   Data Description: 
     |
|    generated by r.mapcalc 
     |
| 
     |
|   Comments: 
     |
|    if(fuel_class==4,3,if(fuel_class==8,15))


This means that the authors had a raster file called 'fuel_class' and 
used the raster calculator (r.mapcalc) to reclass that file attributing 
the value 3 to those pixels who had class=4 in the original map and 
value 15 to pixels with class=8.

I have no idea what this original map contained, so cannot help you 
further (I don't know much about fire spread modeling).

> Can 
> you look at the following problem again?
> 
> 
> # 1 categories -----------------------------------------------------> (1)
> Map of Fire Origin of Bass River Fire --------------------> (2)
> 
> 0.00 0.00 0.00 0.00 ---------------------------------------------> (3)
> 0:no data -----------------------------------------------------------> (4)
> 1:fire origin ---------------------------------------------------------> (5)
> 
> I need to know how to customize the location of origin. I mean, I want 
> to ignite the fire from another place rather the place specified in demo 
> data.

If you have the origin location as coordinates, you can create a vector 
point at the location using v.in.ascii: in the GUI of that module you 
can enter coordinates interactively. Then you convert the map to a 
raster map using v.to.rast.

Moritz


More information about the grass-user mailing list