[GRASS5] [bug #4122] (grass) r.in.gdal won't import some data into lat long projections
Request Tracker
grass-bugs at intevation.de
Tue Feb 28 16:10:52 EST 2006
this bug's URL: http://intevation.de/rt/webrt?serial_num=4122
-------------------------------------------------------------------------
Subject: r.in.gdal won't import some data into lat long projections
Platform: GNU/Linux/x86
grass obtained from: Other (CDROM etc)
grass binary for platform: Downloaded precompiled Binaries
GRASS Version: 6.0.1
I have an image file (short-int png) that is a projected raster map in the EPSG:4326 (lat/long, wgs84) projection. It's got a nice bounding box that goes around the outside of the pixels. The bounding box is -119,41.8,-116.8,44.5. The georeferencing is in a text file with the coverage that states the northern, southern, eastern, and western borders. This data does not need to be rectified or reprojected; it is already in the projection of the grass database, so importing the data should be simple.
In other projections, when I have encountered this sort of data, I have imported it "overriding" the projection of the file with the projection of the current database. I then used r.region to set the bounding box of the raster and am done. So this ought to be easy. I do:
r.in.gdal input=coverage.png output=coverage -o
However this returns:
Over-riding projection check.
Proceeding with import...
WARNING: G_set_window(): Illegal latitude for South
This is because, in the png image, the coordinates of the data run along the lines of -2000 to 0 in the y direction and -2000 to 0 in the x direction. -2000 isn't a valid southern latitude. Thanks for the warning. It's even a good thing for the program to stop here to make sure the importer knows that something's amiss. However I really do mean to do this as the numbering of the pixels in the PNG image is uninteresting. This says it is a warning, not an error, yet there is no way to continue ignoring this warning. What matters to me, and to grass, is the region I am going to assign it after this step.
Solutions:
1. (best in my opinion) Provide a method to ignore this warning. Make sure that our bases are covered in that similar export warnings and reprojection warnings are in place.
2. Change the text from "WARNING: G_set_window(): Illegal latitude for South" to "ERROR: G_set_window(): Illegal latitude for South". Provide another easy avenue for importing data that doesn't include its georeferencing but is already projected. Note the idiosynchracies of the latlong projection with respect to this behaviour in the documentation.
3. Change the r.in stuff to have options for the window be provided with the command.
4. Add an import command that wraps up the r.in infrastructure so that it supports shifting data (providing georeferencing from outside the file). If this is done (I think it'd have to use i. commands) we might as well go all the way and handle reprojection too.
-------------------------------------------- Managed by Request Tracker
More information about the grass-dev
mailing list