[GRASS-user] Long post - Remote Sensing - Classifications

mitch_TX reflexeos at yahoo.it
Wed Feb 18 11:31:21 EST 2009


I forgot:

Debian Lenny fresh installation
GRASS 6.3 fresh installation

Cheers
mitch


mitch_TX wrote:
> 
> Hi community,
> 
> This semester I'm teaching an Intro Remote Sensing course using commercial
> softwares. Since I'm a free spirit, my goal at the end of the semester is
> to show the students that everything could be done using GRASS rather than
> Envi,Erdas or Idrisi.
> Given the fact that they are familiar with GUIs, I'd like to use
> “graphical” commands as much as possible (I don't want to scare them)
> 
> I have a few questions:
> 
> How do I actually save a color composite image as a raster? I know how to
> create it and visualize it
> (GUI: Add RGB or HIS layer → I choose the bands → Display active layer on
> the Map Display)
> (Command: d.rgb red=lsat5_1987_40 at landsat green=lsat5_1987_50 at landsat
> blue=lsat5_1987_30 at landsat -o)
> ...but I don't know how to save it, say, to use it as a base image to draw
> ground truth for a supervised classification.
> 
> 
> The other question is something that has been getting me crazy for a
> couple of days: classifications.
> 
> (GUI: Imagery → Develop images and groups → Create/edit group. In the 
> i.group window I type the name of the group, sub-group and I include
> rasters in the group)
> (Command: i.group group=lsat_try subgroup=lsat_try
> input=lsat5_1987_10 at landsat,lsat5_1987_20 at landsat,lsat5_1987_30 at landsat,lsat5_1987_40 at landsat,lsat5_1987_50 at landsat,lsat5_1987_70 at landsat) 
> and the output is:
> 
> group [lsat_try] - does not yet exist. Creating...
> 
> Adding files to group [lsat_try]
> 
> Adding raster map [lsat5_1987_10]
> 
> Adding raster map [lsat5_1987_20]
> 
> Adding raster map [lsat5_1987_30]
> 
> Adding raster map [lsat5_1987_40]
> 
> Adding raster map [lsat5_1987_50]
> 
> Adding raster map [lsat5_1987_70]
> 
> Writing group REF
> 
> Done.
> 
> Adding files to subgroup [lsat_try]
> 
> Adding raster map [lsat5_1987_10]
> 
> Adding raster map [lsat5_1987_20]
> 
> Adding raster map [lsat5_1987_30]
> 
> Adding raster map [lsat5_1987_40]
> 
> Adding raster map [lsat5_1987_50]
> 
> Adding raster map [lsat5_1987_70]
> 
> Writing subgroup REF
> 
> Done.
> 
> 
> So far so good..right?
> 
> Now..
> (GUI: Imagery → Classify Image → Clustering input for unsupervised
> classification)
> 
> In the i.cluster window I type lsat_try for the group, lsat_try for the
> sub-group, lsat_sign for the signature file, say 15 classes, 50,50 for the
> sampling, lsat_rep for the report.txt (the rest is by default)
> (Command: i.cluster group=lsat_try subgroup=lsat_try sigfile=lsat_sign
> classes=15 sample=50,50 iterations=30 convergence=98.0 separation=0.0
> min_size=17 reportfile=lsat_rep.txt)
> 
> output
> 
> Reading image ... 
> 
> 
> 
> Iteration 1: % Convergence: 80.00 (0s elapsed, 0s left)
> 
> Iteration 2: % Convergence: 100.00 (0s elapsed, 0s left)
> 
> (Pretty short output, innit?)
> 
> 
> 
> Now..
> (GUI: Imagery → Classify Image →Maximum likelyhood classification)
> 
> I fill the boxes with the required info
> (Command: i.maxlik group=lsat_try subgroup=lsat_try sigfile=lsat_sign
> class=class_try reject=class_try_rej)
> 
> but my output is the following:
> 
> Can't read signature file [lsat_sign].
> 
> 
> The thing that is literally driving me crazy is that sometimes it works
> (few times) others it doesn't (I generally I get error messages saying
> that the sub-group doesn't exist in the mapset).
> 
> 
> I delete everything and I start over using only the command line:
> 
> i.group group=lsat_try sub=lsat_try
> in=lsat5_1987_10,lsat5_1987_20,lsat5_1987_30,lsat5_1987_40,lsat5_1987_50,lsat5_1987_70
> 
> output:
> 
> group [lsat_try] - does not yet exist. Creating...
> 
> Adding files to group [lsat_try]
> 
> Adding raster map [lsat5_1987_10]
> 
> Adding raster map [lsat5_1987_20]
> 
> Adding raster map [lsat5_1987_30]
> 
> Adding raster map [lsat5_1987_40]
> 
> Adding raster map [lsat5_1987_50]
> 
> Adding raster map [lsat5_1987_70]
> 
> Writing group REF
> 
> Done.
> 
> Adding files to subgroup [lsat_try]
> 
> Adding raster map [lsat5_1987_10]
> 
> Adding raster map [lsat5_1987_20]
> 
> Adding raster map [lsat5_1987_30]
> 
> Adding raster map [lsat5_1987_40]
> 
> Adding raster map [lsat5_1987_50]
> 
> Adding raster map [lsat5_1987_70]
> 
> Writing subgroup REF
> 
> Done.
> 
> 
> i.cluster group=lsat_try sub=lsat_try sig=lsat_sign classes=15
> report=lsat_rep.txt
> 
> output
> Reading image ... 
> 
> 
> 
> Iteration 1: % Convergence: 65.36 (0s elapsed, 0s left)
> 
> Iteration 2: % Convergence: 71.92 (0s elapsed, 0s left)
> 
> Iteration 3: % Convergence: 86.67 (0s elapsed, 0s left)
> 
> Iteration 4: % Convergence: 90.74 (0s elapsed, 0s left)
> 
> Iteration 5: % Convergence: 93.32 (0s elapsed, 0s left)
> 
> Iteration 6: % Convergence: 95.15 (0s elapsed, 0s left)
> 
> Iteration 7: % Convergence: 96.00 (0s elapsed, 0s left)
> 
> Iteration 8: % Convergence: 96.29 (0s elapsed, 0s left)
> 
> Iteration 9: % Convergence: 96.70 (0s elapsed, 0s left)
> 
> Iteration 10: % Convergence: 96.31 (0s elapsed, 0s left)
> 
> Iteration 11: % Convergence: 96.70 (0s elapsed, 0s left)
> 
> Iteration 12: % Convergence: 96.68 (0s elapsed, 0s left)
> 
> Iteration 13: % Convergence: 96.75 (0s elapsed, 0s left)
> 
> Iteration 14: % Convergence: 96.84 (0s elapsed, 0s left)
> 
> Iteration 15: % Convergence: 96.98 (0s elapsed, 0s left)
> 
> Iteration 16: % Convergence: 97.27 (0s elapsed, 0s left)
> 
> Iteration 17: % Convergence: 97.54 (0s elapsed, 0s left)
> 
> Iteration 18: % Convergence: 97.68 (0s elapsed, 0s left)
> 
> Iteration 19: % Convergence: 98.01 (0s elapsed, 0s left)
> 
> (Nice output!)
> 
> 
> 
> i.maxlik group=lsat_try sub=lsat_try sig=lsat_sign class=lsat_class
> rej=lsat_class_rej
> 
> 
> output
> 
> i.maxlik ... 
> 
> (in a fraction of a second while the graphical way – when it works – takes
> kind of a minute!!)
> 
> I tried to copy the images in the user mapset and start over the GUI way
> but no luck!..same error.
> 
> Is this  a bug or am I “the bug” :-) ??
> I know that if the command line works, you all may not “see what the
> problem is”? But as I said I'd like to use the GUI.
> 
> 
> Let's try with the Supervised using the group and sub-group that worked
> before:
> (GUI: Imagery → Classify image → Interactive input for supervised
> classifications)
> 
> i.class window, say I want to use the NIR band to draw my truths:
> 
>  lsat5_1987_40
> (good)
> 
> group
> lsat_try (the group that worked before)
> (good) 
> 
> sub (if I type list to see the available sub-groups I get: no subgruop
> available in the current mapset)
> 
> the same happens if I create a group and sub in the user mapset using the
> copied images.
> 
> What am I doing wrong? :,(
> 
> 
> 
> Every input from you all will be more than appreciate.
> 
> Thanks,
> mitch.
> 
> 

-- 
View this message in context: http://n2.nabble.com/Long-post---Remote-Sensing---Classifications-tp2347807p2347914.html
Sent from the Grass - Users mailing list archive at Nabble.com.



More information about the grass-user mailing list