[GRASS-user] Spatial Dissolve

Markus Neteler neteler at itc.it
Tue May 29 11:13:00 EDT 2007


Hi Darren,

On Mon, May 28, 2007 at 09:52:59PM -0400, Darren Cope wrote:
>  Hi Markus and list,
> 
>  - I'm using GRASS 6.3.cvs (2006) underQGIS (using the
>  qgis_setup0.8.1preview3.exe installer from:
>  http://qgis.org/uploadfiles/testbuilds/) in a Windows 2000
>  environment.

[ I guess we still don't know which GRASS version they
  package :-( I even filed a bug report there to figure out,
  now way...
]

>  I've installed qgis in a directory (C:\QGIS) with no
>  spaces or path names over 8 characters
>  - the data I downloaded is from the geographynetwork.ca website, and
>  comes in shapefile format
>  - Created a new mapset in GRASS (using QGIS GUI)
>  - Added shapefile to QGIS project
>  - import shapefile to GRASS vector using v.in.ogr using QGIS "GRASS Tools"
>  - run v.clean as per CORINE example (v.clean input=wateroriginal
>  output=waterclean tool=rmdupl) in GRASS shell

Well, the example is a bit different:

http://grass.itc.it/gdp/html_grass63/v.dissolve.html
# remove duplicated tile boundaries:
v.clean clc2000_patched out=clc2000_clean tool=snap,break,rmdupl thresh=.01

# dissolve based on column attributes:
v.dissolve input=clc2000_clean output=clc2000_final col=CODE_00

Please note that you need tool=snap,break,rmdupl, otherwise it won't
work. Attributes should survive (they do for me in various maps).

>  - at this point I noticed that the attribute values are not carried
>  through and I'm left with only "id" and "cat" - why is this, and will
>  it cause problems later on?

The problem originates from the incomplete v.clean call, I guess.

>  - run v.dissolve (v.dissolve input=waterclean output=waterdissolve) in
>  GRASS shell, result is a non-dissolved file - I didn't specify a
>  category, but I'm only doing a "spatial" dissolve, so is this
>  necessary?
>  - I also tried v.extract -d (v.extract -d input=waterclean
>  output=waterextract) in the GRASS shell without success
> 
>  Hopefully I'm missing something obvious!  Any help would be appreciated.

Please try again and let us know where you found the misleading
documentation (so that we can fix it).

Good luck,
Markus

>  Cheers,
> 
>  Darren
> 
>  On 5/28/07, Markus Neteler <neteler at itc.it> wrote:
> > Darren,
> >
> > could you be more specific about what you did (commands + flags/params),
> > which GRASS version etc? I just used this method recently again with
> > success.
> > The v.patch step in the CORINE example is necessary for *CORINE* since
> > you get vector tiles. If you have already a patched map, don't use it.
> >
> > Markus
> >
> > Darren Cope wrote on 05/28/2007 02:01 PM:
> > > Hi Markus,
> > >
> > > I must be missing something, because this still does not seem to work.
> > > I found another (non-GRASS) way to accomplish this, so the priority
> > > is not very high, but I'd still like to figure out the GRASS method.
> > > Is the v.patch step in the CORINE example necessary, or mostly just
> > > the v.clean step with rmdupl?
> > >
> > > Cheers,
> > >
> > > Darren
> > >
> > > On 5/16/07, Markus Neteler <neteler at itc.it> wrote:
> > >>
> > >> Hi Darren,
> > >>
> > >> I also stumbled over this problem, but we solved it. The trick is that
> > >> you first have to remove the duplicated tile boundaries, then dissolve
> > >> works.
> > >> See example for CORINE Landcover SHAPE files:
> > >>  http://grass.itc.it/grass63/manuals/html63_user/v.dissolve.html
> > >>
> > >> Cheers
> > >> Markus
> > >>
> > >>
> > >> Darren Cope wrote:
> > >> >
> > >> > Hi all,
> > >> >
> > >> > I'm new to GRASS, and using it in Windows via QGIS.
> > >> >
> > >> > I am attempting to do a "spatial dissolve" (i.e. not dissolve on an
> > >> > attribute, but rather just remove unnecessary tile boundaries) on a
> > >> > file that I've imported to GRASS from a shapefile, and am so far
> > >> > unsuccessful.  The file contains waterbodies, and some of them are cut
> > >> > in pieces by tile boundaries.  I would like to remove these
> > >> > boundaries.  Can someone please help me out?  I've tried combinations
> > >> > of v.extract -d with no success, and am not sure how the "category"
> > >> > value apply when I'm not dissolving on an attribute.
> > >> >
> > >> > So far my search of the archives has turned up something close, but
> > >> > nothing that seems to fit my situation exactly.
> > >> >
> > >> > Cheers,
> > >> >
> > >> > Darren Cope
> > >> > darrencope at gmail.com
> > >> > http://dmcope.freeshell.org
> >
> >
> > ------------------
> > ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
> > ITC -> since 1 March 2007 Fondazione Bruno Kessler
> > ------------------
> >
> > _______________________________________________
> > grassuser mailing list
> > grassuser at grass.itc.it
> > http://grass.itc.it/mailman/listinfo/grassuser
> >
> 
> 
>  -- 
>  Darren Cope
>  darrencope at gmail.com
>  http://dmcope.freeshell.org
> 
>  _______________________________________________
>  grassuser mailing list
>  grassuser at grass.itc.it
>  http://grass.itc.it/mailman/listinfo/grassuser




More information about the grass-user mailing list