Opened 10 years ago

Last modified 5 years ago

#2280 new enhancement

v.extract: allow random extraction based on feature ids, not only category values

Reported by: mlennert Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Vector Version: svn-trunk
Keywords: v.extract category values random Cc:
CPU: Unspecified Platform: Unspecified

Description

I have a point vector file over 400,000 points) without attribute table. The one relevant info is stored as a category value in layer 1.

I would like to extract at random a subset of 50,000 points. v.extract random= seems like the ideal solution. However, there are only 687 different category values and thus v.extract bails out with

ERREUR :Random category count is larger or equal to uniq
        <point,line,boundary,centroid,area,face> feature category count 687

When I add category values to layer=2, I can then do the v.extract with random=50000, but it only extracts layer 2, so I lose the info in layer 1.

I can see two solutions:

  • allow random selection in feature id space, not only in category space
  • add flag to keep info from all other layers when extracting (which then allows to do the extraction with the extra v.category step mentioned above)

Moritz

Change History (8)

comment:1 by martinl, 8 years ago

Milestone: 7.0.07.0.5

comment:2 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:3 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:4 by neteler, 6 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:5 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:6 by martinl, 6 years ago

Milestone: 7.4.27.6.0

All enhancement tickets should be assigned to 7.6 milestone.

comment:7 by martinl, 5 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:8 by martinl, 5 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.