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...
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...
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.
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 ?
gdalinfo gives me these extends for prec_1 (global grid):
Upper Left (-180.0000000, 90.0000078) (180d 0'0.00"W, 90d 0'0.03"N)
Lower Left (-180.0000000, -60.0000000) (180d 0'0.00"W, 60d 0'0.00"S)
Upper Right ( 180.0000188, 90.0000078) (180d 0'0.07"E, 90d 0'0.03"N)
Lower Right ( 180.0000188, -60.0000000) (180d 0'0.07"E, 60d 0'0.00"S)
Center ( 0.0000094, 15.0000039) ( 0d 0'0.03"E, 15d 0'0.01"N)
The raster map extends just a tiny little bit too far north beyond 90d N, this is illegal in GRASS for latlon. The same raster map from worldclim as generic grid extends exactly from 180W to 180W and 60S to 90N (gdalinfo) and imports all right (overriding the projection check). Maybe somewhere a floating point rounding error crept in?