[GRASS-user] importing a adf file - resolution question

I just used r.in.gdal to import a .adf. The files came from the global aridity and pet database hosted by CGIAR CSI

http://www.cgiar-csi.org/data/global-aridity-and-pet-database

Originally I was getting the warning:

WARNING: G_set_window(): Illegal latitude for North

so I used the -l option. The file appears to have imported

GRASS 6.4.3 (globe_30s):~ > r.in.gdal -l in=~/projects/global_aridity/AI_annual/ai_yr/w001001.adf out=ai
WARNING: Map bounds have been constrained to geographic coordinates. You
will almost certainly want to check map bounds and resolution with
r.info and reset them with r.region before going any further.
Projection of input dataset and current location appear to match
100%
r.in.gdal complete. Raster map created.

I am trying to check the layer with r.info and I see that the resolution looks odd (N looks correct, should be 30 second, but E looks weird):

GRASS 6.4.3 (globe_30s):~ > r.info ai
±---------------------------------------------------------------------------+
| Layer: ai Date: Tue Sep 24 11:06:02 2013 |
| Mapset: global_aridity_pet Login of Creator: kirkw |
| Location: globe_30s |
| DataBase: /Volumes/disk1/home1/kirkw/grassdata |
| Title: ( ai ) |

Timestamp: none
Type of Map: raster Number of Categories: 733928
Data Type: CELL
Rows: 18000
Columns: 43200
Total Cells: 777600000
Projection: Latitude-Longitude
N: 90N S: 60S Res: 0:00:30
E: 179:59:59.932408W W: 180W Res: 0:00:00.000002
Range of data: min = 0 max = 733928
Data Description:
generated by r.in.gdal
Comments:
r.in.gdal -l input="/Volumes/disk1/home1/kirkw/projects/global_aridi\
ty/AI_annual/ai_yr/w001001.adf" output=“ai”
±---------------------------------------------------------------------------+

I’m not sure what to do with this? Any suggestions would be most appreciated!

I'm not sure what to do with this? Any suggestions would be most

appreciated!

have a look what gdalinfo tells about your input data and compare the
gdalinfo-output with g.proj -p of your geographic/projected(?) location.

maybe the datasets of
http://www.cgiar-csi.org/data/global-aridity-and-pet-database may be not
aligned.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/importing-a-adf-file-resolution-question-tp5079666p5079674.html
Sent from the Grass - Users mailing list archive at Nabble.com.

maybe the datasets of

http://www.cgiar-csi.org/data/global-aridity-and-pet-database may be not
aligned.

------------------------

from http://www.cgiar-csi.org/data/global-aridity-and-pet-database:

The Global-PET and Global-Aridity are both modeled using the data available
from WorldClim Global Climate Data (http://WorldClim.org).

------------------------

AFAIR worldclim data has some precision issues/isn't aligned correctly,

give it a try to search in the grass-user/grass-dev-ML for worldclim, there
may be some suggestions to solve this

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/importing-a-adf-file-resolution-question-tp5079666p5079675.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Tue, Sep 24, 2013 at 6:57 PM, Kirk Wythers <kirk.wythers@gmail.com> wrote:

I just used r.in.gdal to import a .adf. The files came from the global
aridity and pet database hosted by CGIAR CSI

CGIAR CSI produces a lot of misaligned raster data.

http://www.cgiar-csi.org/data/global-aridity-and-pet-database

Originally I was getting the warning:
WARNING: G_set_window(): Illegal latitude for North

so I used the -l option. The file appears to have imported

GRASS 6.4.3 (globe_30s):~ > r.in.gdal -l
in=~/projects/global_aridity/AI_annual/ai_yr/w001001.adf out=ai
WARNING: Map bounds have been constrained to geographic coordinates. You
         will almost certainly want to check map bounds and resolution with
         r.info and reset them with r.region before going any further.

As the message says, you need to fix the raster extents and resolution
with r.region

GRASS 6.4.3 (globe_30s):~ > r.info ai

+----------------------------------------------------------------------------+
| Layer: ai Date: Tue Sep 24 11:06:02 2013
| Projection: Latitude-Longitude
|
| N: 90N S: 60S Res: 0:00:30

North has been fixed during import, it was most probably larger than
90N with 90:00:00.067592N

|
| E: 179:59:59.932408W W: 180W Res: 0:00:00.000002

That should most probably be E: 180E W: 180W

I'm not sure what to do with this? Any suggestions would be most
appreciated!

Thus try r.region map=ai e=180 w=-180

HTH,

Markus M