[GRASS-git] [OSGeo/grass] 05d865: v.what.strds: make the test data position-dependen...
Rajveer Bishnoi
noreply at github.com
Fri Oct 9 10:41:52 PDT 2026
Branch: refs/heads/main
Home: https://github.com/OSGeo/grass
Commit: 05d86525f1ac6e1ad140549ed44b0a4d1e5bd93d
https://github.com/OSGeo/grass/commit/05d86525f1ac6e1ad140549ed44b0a4d1e5bd93d
Author: Rajveer Bishnoi <irajveer.bishnoi2310 at gmail.com>
Date: 2026-10-09 (Fri, 09 Oct 2026)
Changed paths:
M scripts/v.what.strds/tests/v_what_strds_test.py
Log Message:
-----------
v.what.strds: make the test data position-dependent (#7930)
* v.what.strds: make the test data position-dependent
The rasters held a single value each, so a point sampled the same number
wherever it was and a pixel shift or a reordered point could not change
the result. Each raster is now map_number * 1000 + row() * 10 + col(), and
the points sit at known cell centres created with v.in.ascii instead of
seeded v.random, so every cell holds a distinct value.
The row assertion now compares whole rows including the category, rather
than dropping the first column, and the fixture docstring no longer claims
the points share a location.
Follow-up to #7898, as discussed there.
* v.what.strds: make the cell encoding actually unique
row() * 10 + col() collides once the region has more than nine columns:
with twelve, (row 1, col 11) and (row 2, col 1) both give 21. The three
sampled cells happened not to collide, so the test passed, but the comment
claimed more than the encoding delivered. Use row() * 100 + col().
To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications
More information about the grass-commit
mailing list