[GRASS-user] v.out.ascii bug with where=

Markus Metz markus.metz.giswork at gmail.com
Thu Mar 21 08:59:01 PDT 2013


On Wed, Mar 20, 2013 at 2:01 PM, Micha Silver <micha at arava.co.il> wrote:
> I need some guidance here. I have a point vector, created using v.to.points.
> Trying to select out some of the points using v.out.ascii with a "where="
> clause, but I'm getting a few points which do NOT match the where condition.

Please try r55482.

Markus M


> Using v.db.select with the same condition works as expected.
> Here's what I get:
>
> GRASS:grass-hecras > g.version
> GRASS 7.0.svn (2013)
>
> GRASS:grass-hecras > v.info -c n_xsect_pts
> Displaying column types/names for database connection of layer <1>:
> INTEGER|cat
> INTEGER|reach
> INTEGER|station_id
>
> GRASS:grass-hecras > v.info -c n_xsect_pts layer=2
> Displaying column types/names for database connection of layer <2>:
> INTEGER|cat
> INTEGER|lcat
> DOUBLE PRECISION|along
>
> GRASS:grass-hecras > v.db.select n_xsect_pts where="reach=1259"
> cat|reach|station_id
> 47|1259|1259001
> 48|1259|1259002
> 49|1259|1259003
> 50|1259|1259004
> 51|1259|1259005
> 52|1259|1259006
> 53|1259|1259007
> 54|1259|1259008
> 55|1259|1259009
> 56|1259|1259010
> 57|1259|1259011
>
> GRASS:grass-hecras > v.out.ascii n_xsect_pts where="reach=1259"
> columns=reach,station_id layer=1
> Fetching data...
> east|north|cat|reach|station_id
> 194816.2781556|391418.14073617|15|1338|1338009 <<-----
> 194785.2522622|391271.38449631|15|1338|1338009
> 194969.45079367|391550.93984055|16|1338|1338010
> 195013.09512544|391407.42965867|16|1338|1338010
> 195056.73945721|391263.91947679|16|1338|1338010
> 195859.29153025|391864.89133855|17|1729|1729001 <<----
> 195865|391715|17|1729|1729001
> 195870.70846975|391565.10866145|17|1729|1729001
> 196110.07342651|391851.71960973|18|1729|1729002
> 196060.83217701|391710.0322802|18|1729|1729002
> 196011.59092752|391568.34495067|18|1729|1729002
> 192978.12160181|391913.80105547|47|1259|1259001
> 193055|391785|47|1259|1259001
> 193131.87839819|391656.19894453|47|1259|1259001
> 193285.50571827|391994.23318538|48|1259|1259002
> 193239.36927725|391851.50467102|48|1259|1259002
> 193193.23283624|391708.77615667|48|1259|1259002
> ...... (lots more correctly matching rows)
>
> Note the first 10 or so rows above do NOT match the where condition!?? I
> tried with several other reach numbers and each time I get a few
> NON-matching rows in the result.
>
> Tearing my hair out....
> Any ideas are certainly welcome,
> Micha
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list