[GRASS-user] Wrong projection info after importing Geotif
Agustin.Lobo at ija.csic.es
Tue Oct 28 04:28:31 EDT 2008
Markus, I already did use -d, I copy the output below. But
the problem that worries me most is not that the default region
be wrong, but that r.in.gdal gets confused and interfered by
the default or active region while I think that the only geographic info
matter for r.in.gdal is the one in the geotiff file,
which is correct.
$ g.region -d
$ g.region -p
projection: 3 (Latitude-Longitude)
$ r.in.gdal input=/media/mifat32/MASTER_ICTA2007_2008/2008b/npp.tif
GRASS_INFO_MESSAGE(18845,1): Projection of input dataset and current
location appear to match
$ g.region rast=npp
$ g.region -p
GRASS_INFO_ERROR(18874,1): region for current mapset is invalid
GRASS_INFO_ERROR(18874,1): line 9: <e-w resol: 0>
GRASS_INFO_ERROR(18874,1): run "g.region"
Markus Neteler wrote:
> On Mon, Oct 27, 2008 at 10:17 PM, Agustin Lobo <Agustin.Lobo at ija.csic.es> wrote:
>> I made the mapset using the QGIS plugin Grass /New mapset.
>> I'm not sure if I made something wrong or it was a problem of
>> the plugin(I'll clarify this), but the fact is that I ended up with
>> this (wrong) region:
>> ~$ g.region -p
>> GRASS_INFO_ERROR(9537,1): region for current mapset is invalid
>> GRASS_INFO_ERROR(9537,1): line 9: <e-w resol: 0>
>> GRASS_INFO_ERROR(9537,1): run "g.region"
> Yes (@devs: suggest the -d flag?)
>> First problem is that I cannot fix this region as explained in
> If you looks closely, there was suggested:
> g.region -d
> Did you really run that (g.region set to default region)?
> GRASS doesn't automatically recover from a illegal
> region setting.
> Then I suppose that it will work.
>> Second problem is that I run r.in.gdal as I mentioned to import the file
>> that I've put
>> in http://aloboaleu.googlepages.com/forMarkus
>> and get a wrong region for the raster as well:
>> r.in.gdal input=/media/mifat32/MASTER_ICTA2007_2008/2008b/npp.tif output=npp
>> ~$ g.region rast=npp
>> ~$ g.region -p
>> GRASS_INFO_ERROR(19559,1): region for current mapset is invalid
>> GRASS_INFO_ERROR(19559,1): line 9: <e-w resol: 0>
>> Nevertheless, according to gdalinfo, the geotif file is correct
>> (see my last message for the gdalinfo output).
>> Probably, r.in.gdal would have worked fine if the default region had been
>> correct, but this is no the point (I think). r.in.gdal should set the region
>> for the raster according to the geotiff settings, which are correct.
>> So there is something wrong with r.in.gdal?
>> Thanks for your patience!
>> Markus Neteler wrote:
>>> On Sat, Oct 25, 2008 at 10:48 AM, Agustin Lobo <Agustin.Lobo at ija.csic.es>
>>>> Thanks Markus,
>>>> but this should not be the correct way for r.in.gdal to work,
>>>> should it? I mean that the default is reading the
>>>> the geotif with its own region, which should not
>>>> be interfered by the current region unless you use
>>>> the -o option. Am I wrong?
>>> since I still don't know which steps you really did (apparently
>>> you created the location from the GeoTIFF file?)
>>> I don't know how to help. Maybe I just missed that.
>>>> Anyway, my problem for applying your solution is
>>>> described in message
>>>> (I set up the default region using qgis
>>> OK, but in QGIS, what did you do to set up the default region?
>>>> and, by some reason, was wrong and cannot modify it)
>>> To reproduce it, I would need the steps in a detailed way...
>>> (say, due to work overload I am most motivated with the
>>> full procedure :-).
>> Dr. Agustin Lobo
>> Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
>> LLuis Sole Sabaris s/n
>> 08028 Barcelona
>> Tel. 34 934095410
>> Fax. 34 934110012
>> email: Agustin.Lobo at ija.csic.es
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
More information about the grass-user