[GRASS-user] i.gensig - multiple signatures into a single file for i.maxlik

Hi Users,

What is the correct format for placing multiple signatures into a single ascii file. 
Is a '#' required between each signature along with a blank line? 
or can i start the new signature with line 2 e.g. #grass
and is there a '#' after the last line to end the file.

1 #
2 #water
3 4186
4 67.9508 48.7346 37.8915 15.3129 13.8473 12.0855 
5 1.74334 
6 0.439504 2.07267 
7 0.662523 1.63501 4.21189 
8 0.530339 2.40757 5.52857 22.433 
9 0.561184 2.30762 5.18846 20.5364 20.4926 
10 0.393218 1.2184 2.63628 9.61528 9.36025 5.8531411
11 #grass
12 2132
13 etc
**OR**
···

Paul J. Shapley MSc CGeog (GIS) FRGS

Am 7. Juni 2018 16:53:51 MESZ schrieb Paul Shapley <p.shapley@gmail.com>:

Hi Users,

What is the correct format for placing multiple signatures into a
single ascii file.

Is a '#' required between each signature along with a blank line?

or can i start the new signature with line 2 e.g. GRASS GIS

and is there a '#' after the last line to end the file.

I'm not in front of a computer right now and cannot check the code, so I don't have an answer, but why are you trying to craft this file by hand ? i.gensig is the tool dedicated to cresting these files for you.

Moritz

1 #
2 #water
3 4186
4 67.9508 48.7346 37.8915 15.3129 13.8473 12.0855
5 1.74334
6 0.439504 2.07267
7 0.662523 1.63501 4.21189
8 0.530339 2.40757 5.52857 22.433
9 0.561184 2.30762 5.18846 20.5364 20.4926
10 0.393218 1.2184 2.63628 9.61528 9.36025 5.8531411

11 GRASS GIS

12 2132

13 etc

*OR*

1 #
2 #water
3 4186
4 67.9508 48.7346 37.8915 15.3129 13.8473 12.0855
5 1.74334
6 0.439504 2.07267
7 0.662523 1.63501 4.21189
8 0.530339 2.40757 5.52857 22.433
9 0.561184 2.30762 5.18846 20.5364 20.4926
10 0.393218 1.2184 2.63628 9.61528 9.36025 5.8531411

11 #

12 GRASS GIS

13 etc

Many thanks,

Hi Paul,

Please keep discussions on the list.

Le Fri, 8 Jun 2018 10:33:56 +0100,
Paul Shapley <p.shapley@gmail.com> a écrit :

Hi Moritz,

Thank you for your help. I am trying to get 5 signatures but the layer
manager is out of action whilst i create the signatures in the 'Class
Manager'.

What do you mean by "out of action" ? And why do you need the layer
manager while using the class manager (we are speaking about
g.gui.iclass [1], here, or ?) ? You can directly create different
classes in one run of this tool. You can save your training areas as a
one single vector map containing all areas of all classes and/or
create the signature file (containing all classes). Check out the video
tutorial linked at [2].

I need to move the map window between each signature. If i
could do them individually i can combine the signatures into one file
later before using 'i.maxlik'.

If you have different classes in different vector maps, you can combine
them using v.patch, rasterize the result using v.to.rast (or possibly
v.to.rast on each and then r.patch) and use then use the resulting
raster map as input for i.gensig. It will automatically create the
signature file combining all classes.

Moritz

[1] https://grass.osgeo.org/grass74/manuals/wxGUI.iclass.html
[2] http://grasswiki.osgeo.org/wiki/WxGUI_Supervised_Classification_Tool