[GRASS-dev] error v.what.rast

Markus Neteler neteler at osgeo.org
Thu Oct 9 14:49:19 PDT 2014


On Wed, Oct 8, 2014 at 9:44 AM, Paulo van Breugel
<p.vanbreugel at gmail.com> wrote:
> On Wed, Oct 8, 2014 at 9:21 AM, Markus Neteler <neteler at osgeo.org> wrote:
>>
>> On Tue, Oct 7, 2014 at 11:20 PM, Paulo van Breugel
>> <p.vanbreugel at gmail.com> wrote:
>> > I am trying to upload raster values of the raster 'grid' to the
>> > attribute
>> > table of the gbif vector layer, as below:
>> >
>> > g.region rast=grid
>>
>> can you please post
>>
>> g.region rast=grid -p
>
>
> GRASS 7.1.svn (latlon):~ > g.region rast=grid -p
> projection: 3 (Latitude-Longitude)
> zone:       0
> datum:      wgs84
> ellipsoid:  a=6378137 es=0.006694379990141316
> north:      37:22:30N
> south:      39S
> west:       20:12:30W
> east:       57:40E
> nsres:      0:02:30
> ewres:      0:02:30
> rows:       1833
> cols:       1869
> cells:      3425877

Can you please post with "-g" which is decimal?

>>
>>
>> > v.what.rast map=gbif raster=grid column=cell2arcm
>> > Reading features from vector map...
>> >  100%
>> > ERROR: Reading raster map <grid@> request for row 1830 is outside region
>>
>> ... and also the boundary box of gbif?
>
> Projection: Latitude-Longitude
>
> N: 37:19:58.08N
> S: 38:52:30S
> E: 57:38:24E
> W: 20:02:49.92W

Also here, can you please post with "-g" which is decimal?

The error message is generated in
lib/raster/get_row.c

static int compute_window_row(int fd, int row, int *cellRow)
{
    struct fileinfo *fcb = &R__.fileinfo[fd];
    double f;
    int r;

    /* check for row in window */
    if (row < 0 || row >= R__.rd_window.rows) {
        G_fatal_error(_("Reading raster map <%s@%s> request for row %d
is outside region"),
                      fcb->name, fcb->mapset, row);
    }

Perhaps a vector point just hits the extents of the computational region or map?

Markus


More information about the grass-dev mailing list