[GRASS-dev] [GRASS GIS] #1151: v.extract: where letting all pass on double prec

#1151: v.extract: where letting all pass on double prec
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.1
Component: Vector | Version: svn-releasebranch64
Keywords: v.extract | Platform: Linux
      Cpu: x86-64 |
-----------------------+----------------------------------------------------
Hi,

I'm trying to clear out some vector points where the depth_m double prec
attribute column is set with null= 9999.9. so I try

{{{
v.extract in=nav_points out=nav_points_clean_depths \
    where='depth_m < 9999'
}}}

but I still get all 129k points (confirmed by v.univar). `v.db.select
where= | wc -l` shows the correct (cleaned) number, so I could cleanse it
though v.db.select|v.in.ascii as a work-around.

A quick test with `v.random -z zmin= zmax=` with 1000 points seemed to
work fine.

the highest real point in it is around 2300, and even with < 500 many
fewer points are written but still some 9999.9s get through. ??! index off
by one error??

seen in 6.4.0 and 6.5svn, haven't tested in trunk.

data avail privately upon request.

?,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1151&gt;
GRASS GIS <http://grass.osgeo.org>

#1151: v.extract: where letting all pass on double prec
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.1
Component: Vector | Version: svn-releasebranch64
Keywords: v.extract | Platform: Linux
      Cpu: x86-64 |
-----------------------+----------------------------------------------------

Comment(by hamish):

`v.edit tool=delete where='depth_m = 9999.9'` gets `1393 features
deleted`, but on the orig file I only see 113:

{{{
g.copy v=nav_points,nav_points_clean_depths

v.edit nav_points_clean_depths tool=delete where='depth_m = 9999.9'
Selecting features...
1393 of 129097 features selected from vector map
<nav_points_clean_depths@user1>
  100%
1393 features deleted
...
}}}

but:
{{{
cut -f3 -d'|' nav.points.dat | grep -c '9999.9'
113

v.db.select nav_points | grep -c '|9999.9|'
113

v.db.select -c nav_points where='depth_m = 9999.9' | wc -l
113
}}}

?!?,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1151#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1151: v.extract: where letting all pass on double prec
----------------------+-----------------------------------------------------
  Reporter: hamish | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.1
Component: Vector | Version: svn-releasebranch64
Resolution: invalid | Keywords: v.extract
  Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Changes (by hamish):

  * status: new => closed
  * resolution: => invalid

Comment:

the wierdness was due to non-unique cat numbers among the points.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1151#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>