[GRASS-dev] [GRASS GIS] #1823: v.clean -rmdup: eliminate identical categories

GRASS GIS trac at osgeo.org
Wed Dec 5 02:37:59 PST 2012


#1823: v.clean -rmdup: eliminate identical categories
-----------------------------+----------------------------------------------
 Reporter:  Nik              |       Owner:  grass-dev@…              
     Type:  enhancement      |      Status:  new                      
 Priority:  major            |   Milestone:  7.0.0                    
Component:  Vector           |     Version:  unspecified              
 Keywords:  v.clean, rmdupl  |    Platform:  MSWindows 7              
      Cpu:  x86-64           |  
-----------------------------+----------------------------------------------

Comment(by mmetz):

 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

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1823#comment:2>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list