[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grass-user
Subject:    Re: [GRASS-user] Point data to region/area
From:       Micha Silver <micha () arava ! co ! il>
Date:       2011-07-29 15:07:20
Message-ID: 1311952040.3177.38.camel () MS-SL6
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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


[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.28.3">
</HEAD>
<BODY>
On Fri, 2011-07-29 at 18:13 +0530, H.S.Rai wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
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.

</PRE>
</BLOCKQUOTE>
<BR>
I think that v.reclass does what you want.<BR>
Two ways to do this (see the man page)<BR>
<BR>
1) You'll need to first create a reclass file that looks like:<BR>
<BR>
cat&nbsp;&nbsp;&nbsp; 1<BR>
where A &lt;= 25<BR>
cat 2<BR>
where A&gt;25 and A&lt;=50<BR>
....<BR>
<BR>
then run<BR>
v.reclass in=point_vect out=point_reclass rule=reclass_file<BR>
<BR>
Note that in the new vector you'll loose any attributes from the original point \
data.<BR> <BR>
2) Alternatively you could add an additional column in the original vector and \
populate it with values based on A, as so:<BR> v.db.addcol points column=&quot;label \
varchar(12)&quot;<BR> v.db.update points col=label val='Region I' \
where='A&lt;=25'<BR> v.db.update points col=label val='Region II' where='A&gt;25 and \
                A&lt;=50'<BR>
...<BR>
<BR>
and now do the v.reclass step but use the parameter 'column=label' to create a new \
reclassed vector based on those labels<BR> <BR>
-- <BR>
Micha<BR>
<BR>
</BODY>
</HTML>



_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic