[GRASSLIST:4836] Re: Problems importing Data into lat/lon with negtiv south value

Paul Kelly paul-grass at stjohnspoint.co.uk
Mon Nov 15 10:57:13 EST 2004


Hello Stefan

On Sun, 14 Nov 2004, Stephan Holl wrote:

>> What actually is the problem? Did something go wrong when you tried to
>> import it into GRASS? Was this using r.in.gdal? And which GRASS
>> version?
>
> yes, r.in.gdal did not work, because latitude for south was illigal.
>
> Proceeding with import...
> WARNING: G_set_window(): Illegal latitude for South
>
> no map is imported.

This doesn't really explain what looks like a bug, but I think it is a 
side-effect of GDAL trying to set the current region to match the imported 
data, which IMHO I don't think it should do. E.g. what if you were running 
an analysis in the background for which the region set was very important, 
and then imported a new file and r.in.gdal suddenly changed the current 
region?

I think it should only do this if the -e flag to extend the region is 
given, or perhaps there should be a new flag specifically to set the 
region to match the imported file.
If you comment out the lines in raster/r.in.gdal/main.c:
     if(G_set_window (&cellhd) < 0)
         exit(3);
and re-compile does it work?
Although seeing that doesn't fix the underlying bug, it might run into 
problems later I suppose.

Anybody else have an opinion on the region setting and extending behaviour 
of r.in.gdal and v.in.ogr?

Paul




More information about the grass-user mailing list