Opened 11 years ago

Last modified 5 years ago

#1823 new enhancement

v.clean -rmdup: eliminate identical categories

Reported by: Nik Owned by: grass-dev@…
Priority: major Milestone: 7.6.2
Component: Vector Version: unspecified
Keywords: v.clean, rmdupl Cc: n.hafner@…, neteler@…
CPU: x86-64 Platform: MSWindows 7

Description

when v.clean with the tool rmdup is used currently there is no possibility to remove identical categories automatically. that would be great. and it would be also very helpful if I could decide to eliminate either the first category or the second automatically in case of the categories are different.

attachment with demo-shapefile

Attachments (1)

temp2.zip (5.4 KB ) - added by Nik 11 years ago.

Download all attachments as: .zip

Change History (11)

by Nik, 11 years ago

Attachment: temp2.zip added

comment:1 by martinl, 11 years ago

Component: DefaultVector
Keywords: v.clean rmdupl added
Milestone: 6.4.37.0.0

in reply to:  description comment:2 by mmetz, 11 years ago

Replying to Nik:

when v.clean with the tool rmdup is used currently there is no possibility to remove identical categories automatically.

If there are no identical categories in the input, there are also no identical categories in the output. If two different lines have identical coordinates and identical categories, one line is removed and the categories are not changed (no duplicate identical categories). IOW, there is no need to eliminate identical categories because the output geometry does (should) not have several identical categories.

and it would be also very helpful if I could decide to eliminate either the first category or the second automatically in case of the categories are different.

What would be possible is to decide whether only the categories of the first geometry encountered are used or all categories of all found duplicates. Discriminating between first and second geometry does not make sense because there is no inherent logical order of geometries.

The purpose of v.clean is to perform topological cleaning of geometries. Cleaning of categories, say, if a geometry has multiple categories in one layer, keep only the unique category if exist, would be a task for v.category.

attachment with demo-shapefile

BTW, the projection info says it's in latlon, but the coordinates seem to be meters or feet, definitively not degrees:

ogrinfo -so temp2 temp2
INFO: Open of `temp2'
      using driver `ESRI Shapefile' successful.

Layer name: temp2
Geometry: Line String
Feature Count: 2
Extent: (459162.929850, 5312217.737961) - (461755.377824, 5314632.492825)

After removing duplicates, the resulting line has two categories, 1 and 2 in layer 1, thus no identical categories.

Markus M

comment:3 by martinl, 8 years ago

Cc: n.hafner@… neteler@… added; n.hafner@… removed
Milestone: 7.0.07.0.5

comment:4 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:5 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:6 by neteler, 6 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:7 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:8 by martinl, 6 years ago

Milestone: 7.4.27.6.0

All enhancement tickets should be assigned to 7.6 milestone.

comment:9 by martinl, 5 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:10 by martinl, 5 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.