<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<link href="chrome://translator/skin/floatingPanel.css"
type="text/css" rel="stylesheet">
</head>
<body bgcolor="#FFFFFF" text="#000099">
Keeping both attributes would make sense in many cases of
overlapping polygons, which, I would guess, is more often about
partly overlapping polygons due to sloppy digitizing. How is GRASS
going to tell what feature is more important? <br>
<br>
But, in case of duplicate rows in your attribute table, except for
the cat, you might be able to remove the duplicate rows in the
attribute table using a simple SQL statement (not sure this works if
you use dbf as database backend), something along the lines of
(google if this doesn't work). <br>
<br>
DELETE FROM table WHERE cat NOT IN<br>
(SELECT MIN(cat) FROM table GROUP BY XXX);<br>
<br>
Whereby XXX would be column with unique values mapping unit (if
there is not such column, you need to GROUP on a set of columns that
together uniquely define each mapping unit). You can do this in the
db.execute. Alternatively, you can use the SELECT statement in the
advanced SQL query builder in the GRASS Attribute Table Manager to
select the duplicates and delete them there. <br>
<br>
If you use the dbf as database backend and the above doesn't work,
you can open the dbf file (which you can find in the 'GRASS DB /
LOCATION/ MAPSET /dbf' folder) in Libreoffice and select all
duplicates and delete, e.g., using a pivot table. Do not use excel,
in my experience that may mess up your dbf file.<br>
<br>
In all cases, this is just to remove rows that are identical except
for one column... you'll have to test whether the results make sense
in your case and you are not messing up your polygon layer.<br>
<br>
<br>
<br>
<br>
On 04/02/2012 09:09 PM, David J. Bakeman wrote:
<blockquote cite="mid:4F79F94D.6010007@comcast.net" type="cite">Markus
Metz wrote:
<br>
<blockquote type="cite">On Sun, Apr 1, 2012 at 11:45 PM, David J.
Bakeman<a class="moz-txt-link-rfc2396E" href="mailto:dbakeman@comcast.net"><dbakeman@comcast.net></a> wrote:
<br>
<blockquote type="cite">David J. Bakeman wrote:
<br>
<blockquote type="cite">Markus Neteler wrote:
<br>
<blockquote type="cite">On Sun, Apr 1, 2012 at 9:45 PM,
David J. Bakeman<a class="moz-txt-link-rfc2396E" href="mailto:dbakeman@comcast.net"><dbakeman@comcast.net></a>
<br>
wrote:
<br>
<blockquote type="cite">I didn't find an answer in the
archives so.
<br>
<br>
I have a shapefile of polygons and some of the polygons
are duplicated.
<br>
I
<br>
thought I could use v.clean tool=rmdupl to get rid of
these polygons. I
<br>
use
<br>
v.in.ogr to read it in and I get the following:
<br>
<br>
WARNING: 8 areas represent more (overlapping) features,
because polygons
<br>
overlap in input layer(s). Such areas are
linked to more than 1
<br>
row in attribute table. The number of features
for those areas
<br>
is
<br>
stored as category in layer 2
<br>
<br>
That is correct in that there are 8 duplicate polygons
but the only
<br>
different attribute is the cat which grass added? What
am I missing? I
<br>
then tried v.clean tool=bpol,rmdupl and nothing changes
it still has the
<br>
8
<br>
duplicates. What am I doing wrong?
<br>
</blockquote>
I think that you need to add the break tool for v.clean.
<br>
</blockquote>
Correct that was actually what I was using: v.clean
tool=break,rmdupl
<br>
<br>
Looking closer I see that when I run v.clean it doesn't even
report the
<br>
duplicates that v.in.ogr did but they are still there. The
only thing that
<br>
differs in coordinates or attributes is the cat attribute
that grass added.
<br>
<blockquote type="cite">
<blockquote type="cite">I am using grass 6.3.0 on fedora
core 14 linux.
<br>
</blockquote>
Please note that you can upgrade to grass-6.4.0-4.fc14:
<br>
<a class="moz-txt-link-freetext" href="http://koji.fedoraproject.org/koji/buildinfo?buildID=263115">http://koji.fedoraproject.org/koji/buildinfo?buildID=263115</a>
<br>
</blockquote>
Thanks I'll see if I can upgrade.
<br>
</blockquote>
I upgraded to the 6.4.0 and the results are exactly the same.
The polygons
<br>
really are identical in every respect except for they have
different values
<br>
in the cat column. Is there some other grass tool for
removing this kind of
<br>
duplicate?
<br>
</blockquote>
After import with v.in.ogr, there are no duplicate geometries
left in
<br>
the vector. What you have now is some areas with two categories
<br>
assigned to them. Removing the duplicates means in this case
removing
<br>
one of the two categories, for example with one of the vector
<br>
digitizers.
<br>
</blockquote>
I'm relatively new to grass but that doesn't make sense. I
started with a shapefile with duplicate features. That is
polygons with the exact same attributes and geometry (they are
identical). What I thought grass could do for me was to read it
in and delete one of the duplicates without user intervention.
After all it identifies the duplicates so why can't it delete one?
<br>
<br>
Are you saying that the duplicate geometry was deleted but it kept
both rows even though they were identical as well? Is there a
operation that would identify and delete rows that differ in only
the cat attribute.
<br>
<blockquote type="cite">Markus M
<br>
<br>
</blockquote>
<br>
_______________________________________________
<br>
grass-user mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
<br>
</blockquote>
<br>
You can use <br>
<div style="bottom: auto; left: 1020px; right: auto; top: 102px;
display: none;" class="translator-theme-default"
id="translator-floating-panel">
<div title="Click to translate"
id="translator-floating-panel-button"></div>
</div>
</body>
</html>