[GRASS-user] Wrong projection info after importing Geotif

Markus Neteler neteler at osgeo.org
Mon Oct 27 17:35:53 EDT 2008


Agus,

On Mon, Oct 27, 2008 at 10:17 PM, Agustin Lobo <Agustin.Lobo at ija.csic.es> wrote:
> Markus,
>
> 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
> http://lists.osgeo.org/pipermail/grass-user/2008-October/047198.html

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.

Markus

> 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!
>
> Agus
>
> Markus Neteler wrote:
>>
>> Agus,
>>
>> On Sat, Oct 25, 2008 at 10:48 AM, Agustin Lobo <Agustin.Lobo at ija.csic.es>
>> wrote:
>>>
>>> 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
>>> http://lists.osgeo.org/pipermail/grass-user/2008-October/047198.html
>>>
>>> (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 :-).
>>
>> Markus
>>
>
> --
> Dr. Agustin Lobo
> Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
> LLuis Sole Sabaris s/n
> 08028 Barcelona
> Spain
> Tel. 34 934095410
> Fax. 34 934110012
> email: Agustin.Lobo at ija.csic.es
> http://www.ija.csic.es/gt/obster
>



-- 
Open Source Geospatial Foundation
http://www.osgeo.org/
http://www.grassbook.org/


More information about the grass-user mailing list