Importing global rasters in GRASS gives me ‘illegal latitude for North’ message

Importing data layers with a global coverage in GRASS GIS might in some cases result in the error message G_set_window(): Illegal latitude for North”. For example, I got the message while trying to import the GlobCover 2009 (version 2.3).

The map is in geographic coordinates in a Plate-Carrée projection (WGS84 ellipsoid) and the extent of the map is 90°N, 180°W, 65°S, 180°E. I would assume this is a proper geotiff file (i.e., it is georeferenced) as I can open it correctly in QGIS (and in ArcGIS or ArcView). Still, I am getting the above-mentioned error message when trying to import it in GRASS GIS.

Checking the help file of r.in.gdal gives the solution. You can set the -l flag to constrain the map coordinates to legal values. You should really only use this when you are sure about the projection of the image. In this case, I am (see above), so let’s see.

As expected / hoped, the layer imports correctly. Coastal boundaries perfectly match that of other layers like the GADM boundaries. Only issue is that the resolution is set at slightly less than 10 arc seconds (Res: 00 00′ 09.99991” / 00 00′ 09.999961”). Close enough for any practical means, but annoying nonetheless. So if anybody has a solution or knows more about what is happening (I might otherwise dig into this a bit more later on)

About these ads

One thought on “Importing global rasters in GRASS gives me ‘illegal latitude for North’ message

  1. Pingback: Global Latitude Map - ALL MAPS – ALL MAPS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s