Open landam opened 5 years ago
Attachment from Nik on 5 Dec 2012 09:12 UTC
https://trac.osgeo.org/grass/attachment/ticket/1823/temp2.zip
Modified by @landam on 5 Dec 2012 09:15 UTC
Comment by mmetz on 5 Dec 2012 10:37 UTC Replying to [ticket:1823 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
Modified by @landam on 12 May 2016 06:42 UTC
Modified by @landam on 25 Aug 2016 15:51 UTC
Comment by @landam on 27 Aug 2016 13:42 UTC Milestone renamed
Comment by neteler on 26 Jan 2018 11:40 UTC Ticket retargeted after milestone closed
Modified by neteler on 12 Jun 2018 20:48 UTC
Comment by @landam on 25 Sep 2018 16:51 UTC All enhancement tickets should be assigned to 7.6 milestone.
Comment by @landam on 25 Jan 2019 21:07 UTC Ticket retargeted after milestone closed
Reported by Nik on 5 Dec 2012 09:11 UTC 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
Operating system
MS Windows
Migrated-From: https://trac.osgeo.org/grass/ticket/1823