[GRASS-user] r.in.gdal error

Hamish hamish_b at yahoo.com
Sat Sep 12 10:29:39 EDT 2009


Alexandre:

> While trying to import ("r.in.gdal") an ESRI grid (.adf
> downloaded from WorldClim) within a location created with
> EPSG 4326 (WGS1984 lon lat), I get the following message
> "G_set_window(): Illegal latitude for North"
> Looking quickly into the list archive and in r.in.gdal
> manual, I found this might come from a file with no
> coordinate system. However, I checked this with ArcGis and
> the file I try to import has the right datum and a prj.adf
> along with the hdr.adf (the target file for r.in.gdal).
> So what does that mean ? Can't GRASS read the prj.adf ? Or
> is there something else ?
> 
> Alex
> 
> P.S.: if there is no solution I will try what is suggested
> by the manual, even if I did not fully get what was
> suggested yet...


see  http://grass.osgeo.org/wiki/GRASS_FAQ#Errors

that is not so clear either*, but if you are using 6.4 probably the best
solution is to use gdal_translate to convert the adf grid into a GeoTiff
as an intermediary step, using the "-a_ullr -180 90 180 -90" option to
tell it what the bounds are. I'd avoid the simple XY solution mentioned
in the wiki if you already have hard numbers about what the bounds should
be set to.

[*] please help improve

The important thing to check is that the gdalinfo program can see the
bounds/projection settings. If GDAL can't figure out what they are there's
little chance GRASS can.

If you are using grass 6.5 or 7 you can just use the 'r.in.gdal -l' flag
to force it, then r.region to fix it.


Hamish



      


More information about the grass-user mailing list