[GRASS-user] Point data to region/area

Micha Silver micha at arava.co.il
Fri Jul 29 11:07:20 EDT 2011


On Fri, 2011-07-29 at 18:13 +0530, H.S.Rai wrote:

> I wish to convert point data (say with attribute 'A' having value
> between 0 - 100), in to thematic map, showing area divided into four
> region as:
> 
> Region I  : Value of A between 0-25
> Region II : Value of A between 25-50
> Region III: Value of A between 50-75
> Region IV: Value of A between 75-100
> 
> What command or sequence of command I need to use. Any pointer to
> document / tutorial will be appreciated.
> 


I think that v.reclass does what you want.
Two ways to do this (see the man page)

1) You'll need to first create a reclass file that looks like:

cat    1
where A <= 25
cat 2
where A>25 and A<=50
....

then run
v.reclass in=point_vect out=point_reclass rule=reclass_file

Note that in the new vector you'll loose any attributes from the
original point data.

2) Alternatively you could add an additional column in the original
vector and populate it with values based on A, as so:
v.db.addcol points column="label varchar(12)"
v.db.update points col=label val='Region I' where='A<=25'
v.db.update points col=label val='Region II' where='A>25 and A<=50'
...

and now do the v.reclass step but use the parameter 'column=label' to
create a new reclassed vector based on those labels

-- 
Micha

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110729/b30ae207/attachment.html


More information about the grass-user mailing list