[GRASS-user] Re: Having some difficulties with v.to.rast

Thanks for your feedback Achim

Now I did:

v.centroids --overwrite input=teste01@Brazil output=teste01_centroid@Brazil cat=1 step=0
Vector map <teste01_centroid> already exists and will be overwritten
Processing features…
2 new centroids placed in output map
Copying attribute table(s)…
Building topology for vector map <teste01_centroid>…
Registering primitives…
4 primitives registered
15 vertices registered
Building areas…
2 areas built
2 isles built
Attaching islands…
Attaching centroids…
Number of nodes: 4
Number of primitives: 4
Number of points: 0
Number of lines: 0
Number of boundaries: 2
Number of centroids: 2
Number of areas: 2
Number of isles: 2
v.category complete. 2 features modified.
(Fri Nov 05 14:23:15 2010) Command finished (0 sec)

and then:
v.to.rast --overwrite input=teste01_centroid@Brazil output=teste01centroid@Brazil use=val value=5

I got:

Loading data…
Pass 1 of 2:
Reading areas…
Reading features…
Writing raster map…
Pass 2 of 2:
Reading areas…
Writing raster map…
Converted areas: 2 of 2
Converted points/lines: 0 of 0
v.to.rast complete.

And now It seems all OK :slight_smile:
But I do have 1 (last) question:
When I use the Query pixel value feature, I get this:
568209.941176|9248338.294118||5|Value 5 Does this means that each pixel has a raster value of 5 right? Because I’m also getting Value 5 and I don’t what it is…

Thanks
Luisa

Am 05.11.2010 15:31, schrieb Luisa Peña:

v.to.rast --overwrite input=teste01_centroid@Brazil
output=teste01centroid@Brazil use=val value=5

But I do have 1 (last) question:
When I use the Query pixel value feature, I get this:
568209.941176|9248338.294118||5|Value 5 Does this means that each pixel
has a raster value of 5 right? Because I'm also getting Value 5 and I
don't what it is..

Yes, setting value=5 means, all areas will be covered with pixels value 5. If you want different values for each area, you have to use use=attr and define a column name containing a numeric (column=your_column) or use=cat to use the categogy value.

You can see the categories with "v.category input=... option=report".

When you use an attribute, you have to have an table connected with the vector layer.

Achim