[GRASSLIST:9842] Re: Reclassifying Vector Data (Soils)

Dylan Beaudette dylan.beaudette at gmail.com
Sun Jan 15 12:56:07 EST 2006


Nurit,

I have not used v.reclass for something like this, although it should
be possible. You could do the classification within the aatribute
table:

alter table soils add column new_cat int

update soils set new_cat = 1 where MUSYM = '5010' OR MUSYM = '5030' OR
MUSYM = '5040' OR MUSYM = '5060' OR MUSYM = 'SL' ;

...

and then create a new map, using the column new_cat.

Dylan


On 1/14/06, Nurit Finn <nfinn at cedar-rapids.net> wrote:
> Yes, it's a SSURGO dataset.  The version number is FGDC-STD-001-1998.
>
> Here are the rules I used:
>
>
>
> # WVALandforms
>
> cat 1
>
> where MUSYM = '5010' OR MUSYM = '5030' OR MUSYM = '5040' OR MUSYM = '5060'
> OR MUSYM = 'SL'
>
> cat 2
>
> where MUSYM = '27B'
>
> cat 3
>
> where MUSYM = '107' OR MUSYM = '153' OR MUSYM = '221' OR MUSYM = '221B' OR
> MUSYM = '274'OR MUSYM = '329' OR MUSYM = '354' OR MUSYM = '507' OR MUSYM =
> '6' OR MUSYM = '621' OR MUSYM = '836B' OR MUSYM = '836C2' OR MUSYM = '855'
> OR MUSYM = '95' OR MUSYM = '956' OR MUSYM = 'W'
>
> cat 4
>
> where MUSYM = '135' OR MUSYM = '173' OR MUSYM = '177' OR MUSYM = '177B' OR
> MUSYM = '177C' OR MUSYM = '177C2' OR MUSYM = '178' OR MUSYM = '178B' OR
> MUSYM = '1936' OR MUSYM = '457' OR MUSYM = '536' OR MUSYM = '695' OR MUSYM =
> '733' OR MUSYM = '777' OR MUSYM = '777B' OR MUSYM = '777C2' OR MUSYM = '936'
> OR MUSYM = '976'
>
> cat 6
>
> where MUSYM = '138D2' OR MUSYM = '171' OR MUSYM = '171C2' OR MUSYM = '171D2'
> OR MUSYM = '171F' OR MUSYM = '198B' OR MUSYM = '213' OR MUSYM = '214' OR
> MUSYM = '29' OR MUSYM = '325' OR MUSYM = '377' OR MUSYM = '398' OR MUSYM =
> '407B' OR MUSYM = '412E' OR MUSYM = '444' OR MUSYM = '55' OR MUSYM = '551'
> OR MUSYM = '612E2' OR MUSYM = '613' OR MUSYM = '613C' OR MUSYM = '755' OR
> MUSYM = '782C2' OR MUSYM = '83C2'
>
> cat 7
>
> where MUSYM = '151' OR MUSYM = '152' OR MUSYM = '174' OR MUSYM = '174B' OR
> MUSYM = '175' OR MUSYM = '175B' OR MUSYM = '188' OR MUSYM = '201B' OR MUSYM
> = '225' OR MUSYM = '226' OR MUSYM = '236C' OR MUSYM = '236C2' OR MUSYM =
> '236D2' OR MUSYM = '236E2' OR MUSYM = '236F' OR MUSYM = '284' OR MUSYM =
> '284B' OR MUSYM = '284C' OR MUSYM = '335' OR MUSYM = '391B' OR MUSYM = '41B'
> OR MUSYM = '41C' OR MUSYM = '558' OR MUSYM = '559' OR MUSYM = '583' OR MUSYM
> = '611' OR MUSYM = '612G2' OR MUSYM = '651' OR MUSYM = '695' OR MUSYM =
> '725' OR MUSYM = '73C' OR MUSYM = '73E' OR MUSYM = '84'
>
> cat 8
>
> where MUSYM = '138' OR MUSYM = '138B' OR MUSYM = '138C' OR MUSYM = '138C2'
> OR MUSYM = '169B' OR MUSYM = '171B' OR MUSYM = '184' OR MUSYM = '213B' OR
> MUSYM = '214B' OR MUSYM = '214C' OR MUSYM = '216B' OR MUSYM = '217' OR MUSYM
> = '217B' OR MUSYM = '236B' OR MUSYM = '377B' OR MUSYM = '382' OR MUSYM =
> '399' OR MUSYM = '412C' OR MUSYM = '471' OR MUSYM = '612B' OR MUSYM =
> '612C2' OR MUSYM = '613B' OR MUSYM = '614B' OR MUSYM = '614C3' OR MUSYM =
> '62C3' OR MUSYM = '62C3' OR MUSYM = '62D3' OR MUSYM = '62E3' OR MUSYM =
> '638C2' OR MUSYM = '638D2' OR MUSYM = '706' OR MUSYM = '706B' OR MUSYM =
> '782' OR MUSYM = '782B' OR MUSYM = '83' OR MUSYM = '83B'
>
>
>
>
> Would an alternative be to add a column with the new categories to the .dbf
> file, and then use this to create a new vector map?  In this case, there
> would be fewer categories to reclassify.
>
> Thanks!
>
> Nurit
>
>
>
>
> On 1/14/06 8:01 PM, "Dylan Beaudette" <dylan.beaudette at gmail.com> wrote:
>
> > Looks like you are working with the NRCS-NCSS SSURGO dataset ? It would
> > help if you can post the SSURGO version number for this dataset, and
> > the rules used in v.reclass.
> >
> > A quick tip for NRCS-NCSS soils data: a relational DB like MySQL/PgSQL
> > will save you a lot of time and effort.
> >
> > I have posted some ideas on getting SSURGO v.2 data into a MySQL DB,
> > along with a template database here:
> >
> > (see bottom of the page)
> > http://casoilresource.lawr.ucdavis.edu/drupal/node/99
> >
> >
> > cheers,
> >
> > --
> > Dylan Beaudette
> > Soils and Biogeochemistry Graduate Group
> > University of California at Davis
> > 530.754.7341
>
>




More information about the grass-user mailing list