[GRASSLIST:6262] r.in.gdal LatLong projection: G_set_window(): Illegal latitude for North

Troubles with r.in.gdal import:

I have found following constraint when I tried import WORLDCLIM dataset:

New location as latlon wgs84:

GRASS 6.0.0 (LatLongWGS84):~ > g.proj -p
-PROJ_INFO-------------------------------------------------
name : Lat/Lon
proj : ll
ellps : wgs84
-PROJ_UNITS------------------------------------------------
unit : degree
units : degrees
meters : 1.0
GRASS 6.0.0 (LatLongWGS84):~ > g.region -dp
projection: 3 (Latitude-Longitude)
zone: 0
datum: ** unknown (default: WGS84) **
ellipsoid: wgs84
north: 90N
south: 60S
west: 180W
east: 180E
nsres: 0:00:30
ewres: 0:00:30
rows: 18000
cols: 43200
...

I would like to import there:
...
GRASS 6.0.0 (LatLongWGS84):~ > r.in.gdal -eo in=/adat/cd/WORLDCLIM/tmin_30s_esri/tmin_1 out=tmin1
Over-riding projection check.
Proceeding with import...
WARNING: G_set_window(): Illegal latitude for North
...

Why is ilegal latitude can be understand from:

...
GRASS 6.0.0 (LatLongWGS84):~ > r.in.gdal -eo in=/adat/cd/WORLDCLIM/tmin_30s_esri/tmin_1 out=tmin1 loc=new
100%
CREATING SUPPORT FILES FOR tmin1
...

Switch to new created location (x,y) called "new":

> ...

GRASS 6.0.0 (new):~ > r.info tmin1
+----------------------------------------------------------------------------+

| Layer: tmin1 Date: Wed Mar 23 21:00:55 2005 |
| Mapset: PERMANENT Login of Creator: zaboj |
| Location: new |
| DataBase: /adat/grassdata |
| Title: ( tmin1 ) |
|----------------------------------------------------------------------------|

| |
| Type of Map: raster Number of Categories: 266 |
| Data Type: CELL |
| Rows: 18000 |
| Columns: 43200 |
| Total Cells: 777600000 |
| Projection: x,y (zone 0) |
| N: 90.00000782 S: -60 Res: 0.00833333 |
| E: 180.00001878 W: -180 Res: 0.00833333 |
| Range of data: min = -573 max = 266 |
| |
| Data Source: |
| |
| |
| |
| Data Description: |
| generated by r.in.gdal |
| |
| |
+----------------------------------------------------------------------------+

Is there any way how to import such data and project it (into krovak-gis projection)?

Thanks

  Zaboj Hrazsky
    ___________________________________________

     DAPHNE ÈR - Institut aplikované ekologie
     Husova 45, 370 05 Èeské Budìjovice
     http://www.daphne.cz
     Tel: +420 776053573
     ICQ: 332817882
    ___________________________________________

GRASS6.0 compiled with PROJ4 4.4.9 version runs on my debian sarge... but with patched PJ_krovak.c.

Detailed description in czech ... http://mpa.itc.it/radim/jtsk/index.html
and here is the patch personaly... http://mpa.itc.it/radim/jtsk/PJ_krovak.c.patch

(shortly: run "patch PJ_krovak.c PJ_krovak.c.patch" for the file PJ_krovak.c in PROJ4 src tree before compilation of PROJ4)

And everything works...

I overide the bug with Radim Blazek help:

1) to import into new location (see g.manual r.in.gdal)
2) to change projection for new location running g.setproj from xy to LatLong with wgs84 datum
3) to modify "GRASSDATA_DIR"/"LOCATION"/"MAPSET"/cellhd/"MAPNAME" file changing first line:
from "proj: 0" to "proj: 3" #signals type of location (xy versus LatLong)

After these r.proj was running without problems and reprojected maps match the others from krovak (s-jtsk) location.

... but thanks for your experiences it seems PROJ4 library need the 5 version with improved PJ_krovak.c :-).

Zaboj

         Kingsley Burlinson wrote:

Zaboj
It is possible there is a problem in the PROJ4 libraries for the krovak projection and perhaps this is causing your problems. I am just compiling grass now and I had major errors with PROJ4 version 4.4.9 and had to remove the krovak projection to get it to compile at all.

Perhaps you can try another projection and see if it works in that to check this potential problem.

I have notified the PROJ4 list of this but have had no reply yet.
Kingsley Burlinson Darwin

Zaboj Hrazsky wrote:

Troubles with r.in.gdal import:

I have found following constraint when I tried import WORLDCLIM dataset:

r.in.gdal LatLong projection: G_set_window(): Illegal latitude for North