[GRASS-user] what is requried when import data to grass?
nikos.alexandris at felis.uni-freiburg.de
Thu Jun 11 05:18:04 EDT 2009
> When import some raster data to grass,I use the following cmd:
> 1) g.region -d
This sets to the "default" region which one previously needs to define,
i.e. needs to create with "g.region -s". Please check the manual of
> 2) r.in.gdal input=D:/test.TIF output=testTT --overwrite
> I got the error message as following:
> Projection of dataset does not appear to match current location.
>Location PROJ_INFO is:
> Import dataset PROJ_INFO is:
> cellhd.proj = 0 (unreferenced/unknown)
That's seems normal. Your test.TIF either isn't georeferenced or it lost
its geotags at some point (after editing with non-GIS tool perhaps?).
> 3) change the cmd to " r.in.gdal -o input=D:/test.TIF output=testTT
> --overwrite " I know this override the projection,however I am not
> sure the potential effect to the data.
You should use that only if you _know_ that your test.TIF data are
projected in the system that your grass-location is defined (e.g.
"datum: nad27" as one can see in the error message above). If your data
(test.TIF) are projected in another proj. system expect errors.
> Now the tiff is imported,and I got testTT.bule testTT.red
> testTT.green, then I open them can only see blank. So I wonder it is
> caused by the projection or location,I use the spanish data as the
> default location , and I tried to create new location and mapset but
> never success...
So, given that test.TIF is in "UTM, datum: nad27" then you need to:
1. import with r.in.gdal -o (as you already did).
2. g.region rast=testTT.blue
3. view your data
If the test.TIF data are projected in another system you need to:
1. find out which is that projection system
2. use some gdal tools to assign the proj. information in the test.TIF
3. define a "new" grass-location based on the projection information of
the test.TIF data
4. import with r.in.gdal (without the use of "-o" flag)
5. g.region rast=OneOfTheImportedBands
6. view, process, etc.
More information about the grass-user