Re: [GRASS-user] ... getting rid of duplicate polygons ...

2017-02-15 Thread Markus Metz
On Fri, Feb 10, 2017 at 5:44 PM, Uwe Fischer  wrote:
>
> Hello list,
>
> I have a question about dealing with duplicate polygons (dp) coming into
GRASS from a polygon shapefile. The polygons are not overlapping or having
gaps, but there are a number of real duplicate ones (polygons show parcels
with owners, and if one parcel has two or more owners, e. g. wife and
husband, this situation in the shapefile is represented by two identical
polys with two database rows that only differ in the owners name).
>
> My goal is to get rid of duplicates, having a result with only one
polygon/centroid at a given location with only one owner name. The name
does not matter, it can be chosen arbitrary by the system. This works fine
when using ESRI "clean"-command. The structure of the database table is
maintained while one (or many) of the dp is/are lost, leaving only one
valid polygon.
>
> Now, I found an older thread called "unable to get rid of duplicate
polygons". Obviously, the problem/question is the same but I could not find
a solution for GRASS there.

There is no tool in GRASS that automatically removes all but one category
values from a feature. You would need to use the vector digitizer or v.edit.

Alternatively, you could create a copy of the vector, remove all categories
from layer 1 and 2 with
v.category type=centroid option=del cat=-1 layer=1
and
v.category type=centroid option=del cat=-1 layer=2

Then assign new categories with
v.category type=centroid option=add cat=1 layer=1

Finally try v.distance from= to=
from_type=centroid from_layer=1 to_type=centroid to_layer=1 upload=to_attr
to_column= column=

Markus M

> So I tried:
>
> v.clean -c input=input@mapset output=output_clean tool=snap,rmdac,bpol
threshold=0.01,0,0
>
> and
>
> v.clean -c input=input@mapset output=output_clean
 tool=break,snap,rmdupl,rmdac,bpol
>
> Nothing did work. I get a map with tree layers, one showing the islands
only (layer 0), one showing the complete polygon set with duplicates (1),
and one showing only the duplicates (2). I also tried to delete layer 2,
assuming that this might remove the dp, but it only messed up the dataset.
>
>
>
> What am I doing wrong?
>
>
>
> Regards, Uwe
>
>
>
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] ... getting rid of duplicate polygons ...

2017-02-11 Thread Huidae Cho
Uwe,

It wouldn't be easy to tell what your problem is without seeing your
dataset. If you don't want to share your dataset, maybe create a small
subset of it so others can try it.

Regards,
Huidae

On Fri, Feb 10, 2017 at 11:44 AM, Uwe Fischer  wrote:

> Hello list,
>
>
>
> I have a question about dealing with duplicate polygons (dp) coming into
> GRASS from a polygon shapefile. The polygons are not overlapping or having
> gaps, but there are a number of real duplicate ones (polygons show parcels
> with owners, and if one parcel has two or more owners, e. g. wife and
> husband, this situation in the shapefile is represented by two identical
> polys with two database rows that only differ in the owners name).
>
>
>
> My goal is to get rid of duplicates, having a result with only one
> polygon/centroid at a given location with only one owner name. The name
> does not matter, it can be chosen arbitrary by the system. This works fine
> when using ESRI "clean"-command. The structure of the database table is
> maintained while one (or many) of the dp is/are lost, leaving only one
> valid polygon.
>
>
>
> Now, I found an older thread called "unable to get rid of duplicate
> polygons". Obviously, the problem/question is the same but I could not find
> a solution for GRASS there. So I tried:
>
>
>
> v.clean -c input=input@mapset output=output_clean tool=snap,rmdac,bpol
> threshold=0.01,0,0
>
>
>
> and
>
>
>
> v.clean -c input=input@mapset output=output_clean
> tool=break,snap,rmdupl,rmdac,bpol
>
>
>
> Nothing did work. I get a map with tree layers, one showing the islands
> only (layer 0), one showing the complete polygon set with duplicates (1),
> and one showing only the duplicates (2). I also tried to delete layer 2,
> assuming that this might remove the dp, but it only messed up the dataset.
>
>
>
> What am I doing wrong?
>
>
>
> Regards, Uwe
>
>
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

[GRASS-user] ... getting rid of duplicate polygons ...

2017-02-10 Thread Uwe Fischer
Hello list,

 

I have a question about dealing with duplicate polygons (dp) coming into
GRASS from a polygon shapefile. The polygons are not overlapping or having
gaps, but there are a number of real duplicate ones (polygons show parcels
with owners, and if one parcel has two or more owners, e. g. wife and
husband, this situation in the shapefile is represented by two identical
polys with two database rows that only differ in the owners name).

 

My goal is to get rid of duplicates, having a result with only one
polygon/centroid at a given location with only one owner name. The name does
not matter, it can be chosen arbitrary by the system. This works fine when
using ESRI "clean"-command. The structure of the database table is
maintained while one (or many) of the dp is/are lost, leaving only one valid
polygon.

 

Now, I found an older thread called "unable to get rid of duplicate
polygons". Obviously, the problem/question is the same but I could not find
a solution for GRASS there. So I tried:

 

v.clean -c input=input@mapset output=output_clean tool=snap,rmdac,bpol
threshold=0.01,0,0

 

and

 

v.clean -c input=input@mapset output=output_clean
tool=break,snap,rmdupl,rmdac,bpol

 

Nothing did work. I get a map with tree layers, one showing the islands only
(layer 0), one showing the complete polygon set with duplicates (1), and one
showing only the duplicates (2). I also tried to delete layer 2, assuming
that this might remove the dp, but it only messed up the dataset.

 

What am I doing wrong?

 

Regards, Uwe

 

___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

[GRASS-user] ... getting rid of duplicate polygons ...

2017-02-01 Thread Uwe Fischer
Hello list,

 

I have a question about dealing with duplicate polygons (dp) coming into
GRASS from a polygon shapefile. The polygons are not overlapping or having
gaps, but there are a number of real duplicate ones (polygons show parcels
with owners, and if one parcel has two or more owners, e. g. wife and
husband, this situation in the shapefile is represented by two identical
polys with two database rows that only differ in the owners name).

 

My goal is to get rid of duplicates, having a result with only one
polygon/centroid at a given location with only one owner name. The name does
not matter, it can be chosen arbitrary by the system. This works fine when
using ESRI "clean"-command. The structure of the database table is
maintained while one (or many) of the dp is/are lost, leaving only one valid
polygon.

 

Now, I found an older thread called "unable to get rid of duplicate
polygons". Obviously, the problem/question is the same but I could not find
a solution for GRASS there. So I tried:

 

v.clean -c input=input@mapset output=output_clean tool=snap,rmdac,bpol
threshold=0.01,0,0

 

and

 

v.clean -c input=input@mapset output=output_clean
tool=break,snap,rmdupl,rmdac,bpol

 

Nothing did work. I get a map with tree layers, one showing the islands only
(layer 0), one showing the complete polygon set with duplicates (1), and one
showing only the duplicates (2). I also tried to delete layer 2, assuming
that this might remove the dp, but it only messed up the dataset.

 

What am I doing wrong?

 

Regards, Uwe

 

___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user