Thank you Vincent and Nikos for your answers,

Of course I mean v.dissolve and not r.dissolve...

Maybe I'm not clear enough wiht my problem... 

To explain what I want to obtain : 
I've created such a shapfile in qgis using the tool "add part". I have then one 
feature with two polygone (see attached files).
Then I've imported this shapfile into GRASS and I also see one feature with two 
polygones.

Is it possible to create such files with GRASS and in my case to merge 
different non-adjacent polygone into one polygone?

The reason of this is I have to do statistics (v.rast.stats) with this shp and 
I want to consider all the features of a category for calculating the stats and 
the feature separated. (e.g. I want to have the mean of all pixels contained in 
the polygones of the same category and for each polygones separately)

regards


________________________________________
De : [email protected] [[email protected]] de 
la part de Nikos Alexandris [[email protected]]
Date d'envoi : jeudi 16 mai 2013 15:24
À : [email protected]
Objet : Re: [GRASS-user] Merge polygone with same attribut of a shapefile

BLANDENIER Lucien wrote:

> Dear all,

Hi Lucien,

> I'm trying to merge all polygones with the same attribut of a shapefile. I
> saw it is possible to merge adjacent polygone with r.dissolve

Small correction:  it is v.dissolve (all v.* modules operate on vector maps as
opposed to r.* modules which operate on raster maps).

> but I didn't found how to do this with polygones that are not adjacent. Is
> there a way to do this?

I don't know/I don't think so.  GRASS' vector model is a topologically aware
system. This means that it "understands", exactly, adjacent geographic
components.  Being so, by design, supports a clean geometry (for example, non
duplication of features) and sound vector-based analyses.

If I get the "picture" correct, there is no possibility to topologically merge
distinct and spatially non-related geographic features.

> My goal is to minimise the number of feature into my table in order to have
> only one feature by category, but containing several polygones.

What is the reason to worry about the number of vector features in a vector
map?  The only way to minimise features is by eliminating them, which is
rather unwanted.

You might want to read

- "Vector object categories and attribute management" section in the "Vector
data processing in GRASS GIS" manual:
<http://grass.osgeo.org/grass64/manuals/vectorintro.html>
- "Developer's Vector FAQ" <http://grass.osgeo.org/programming7/vlibFAQ.html>

Each unique vector feature holds internally (that is, not exposed to the user)
a unique "feature id" (this is a 1:1 relationship).  The user can, however,
use the concept of Categories (another identification number), to assign a
vector feature to a category.  Categories are not unique and they _can_ be
(mis-)used to link to several vector features (this is a "1 Cat":"Many vector
features" relationship).  Note, the user can use them as being unique!  Also,
any vector feature can be linked to several category ids (this is a "1 Vector"
: "Many Categories" relationship).

The other interesting concept, in GRASS GIS, is the one of multiple layers.
The user can link multiple attribute tables by using multiple layers
(<http://grass.osgeo.org/programming7/vectorlib.html#vlibCategoriesLayers>).

So, maybe (inside GRASS GIS) you simply need to assign the same category to
many polygons?

Best, Nikos
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Attachment: test_polygones.dbf
Description: test_polygones.dbf

Attachment: test_polygones.prj
Description: test_polygones.prj

Attachment: test_polygones.qpj
Description: test_polygones.qpj

Attachment: test_polygones.shp
Description: test_polygones.shp

Attachment: test_polygones.shx
Description: test_polygones.shx

_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to