[GRASS-dev] new addon: v.what.rast.multi

Moritz Lennert mlennert at club.worldonline.be
Tue May 9 06:03:33 PDT 2017


On 09/05/17 14:37, Veronica Andreo wrote:
> Hello Pierre,
>
> Thanks for this new add-on! Comes on time for me :)
>
> I'm testing it and I have observed something odd.
> I'm querying integer maps but v.what.rast.multi gives me float values. I
> run v.what.rast and I get the proper integer values. Does it have
> anything to do with what Paulo just pointed out?


The module just loops over a series of v.what.rast calls, so results 
should not be different. If any, Paulo's point reinforces this as the 
'-i' flag (i.e.interpolate nearest points) is never used...

And I cannot confirm:

g.region rast=elev_ned_30m
v.random test npoints=500
r.mapcalc "srtm = int(elev_srtm_30m)"
r.mapcalc "ned = int(elev_ned_30m)"
v.what.rast.multi map=test raster=elev_srtm_30m,elev_ned_30m,srtm,ned 
columns=srtm_float,ned_float,srtm_int,ned_int
v.db.select test col=srtm_float,ned_float,srtm_int,ned_int
[...]
105.1695|103.4447|104|102
124.6583|122.6958|124|122
104.6636|93.28199|104|93
81.77528|79.49014|81|78
90.53698|86.29738|89|85
80.44241|76.85014|79|76
127.8045|125.4002|127|124
106.0921|104.8796|105|104
151.5683|148.3245|150|148
121.2332|116.3521|120|116
123.2887|115.1104|123|114

Moritz


More information about the grass-dev mailing list