On 08/15/2012 03:40 PM, Samantha Goodchild-Brown wrote:
On 2012/08/15 12:40, Micha Silver wrote:
On 15/08/2012 11:17, Samantha Goodchild-Brown wrote:
Can anyone tell me how to make a training map for supervised classification using QGIS Grass (1.8).

I have successfully made the polygons with label attributes (as a grass vector layer - attribute table now looks the same as the sample datasets from installation) but these attributes are lost when converting to raster. Hence my raster comes out as one cell (one value to region extents).


You should be getting a raster with different cat values for each of the input vector categories.
Yes
In the GRASS toolbox is the module v.to.rast.attr which takes a numeric column in the vector attrib table to be used as the new raster categories.
yes
The full options for v.to.rast (not available in the QGIS GRASS plugin, only in GRASS itslef)
Ah, confirmation! I was thinking to go to linux - any comments on which is the better to use?

You should be able to work with GRASS on Linux, Mac and Windows pretty much equally well. Moving to Linux is probably a good move in general, although off topic for this list. But I would suggest to have a look at the OSGeo LiveDVD which is based on Xubuntu and has just about all the Open Source GIS stuff available today pre-installed. You can try it out from the LiveDVD, run it in a Virtual Machine, making the migration to Linux easier, or just go ahead and install it.
 
include a parameter "labelcol=" to give the resulting raster categories a text label in addition to the numeric cat value. 

Also be sure to run g.region vect=<your training vector map> before converting.
This is new, thanks. This could be a missing link.....

 
If I use Grass GUI (6.4.2) to convert a vector polygon to a raster, georeferencing gets lost.

That should certainly not be happening. What do you get from v.info on the input vector, and r.info on that output raster?
In the process (with this interface) it does complain about a colours column that it needs extra - have tried a few different methods there.
Indicates it made it sucessfully but 'couldn't resolve the colour table issue' (with everything I have tried) - then when you zoom to that layer you are at the CM's and of course - no colours. But I didn't know about g.region.vect.....

I don't know why the color table issue comes up, but it shouldn't interfere with creation of the raster. Did you have a look at r.info and v.info?

Are these known bugs? can someone give me a workaround? Or fix my methodology if I am making common dingbat errors.

Thanks
Sam
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

This mail was received via Mail-SeCure System.




-- 
Micha Silver
052-3665918



This mail was received via Mail-SeCure System.


_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to