[GRASS-user] Re: GRASS-user] Help with reprojection (Hamish)

Markus Neteler neteler at osgeo.org
Mon Jan 5 02:01:42 EST 2009


On Mon, Jan 5, 2009 at 6:37 AM, rchirgwin at ozemail.com.au
<rchirgwin at ozemail.com.au> wrote:
>> Date: Sat, 3 Jan 2009 13:25:31 -0800 (PST)
>> From: Hamish <hamish_b at yahoo.com>
>>
>> Hamish wrote:
>>> > - create a simple xy location
>>> >     (lat/lon location will not allow north > 90, and your image while
>>> >      still not geo-referenced will go to 8100)
>>> > - run r.region to set n,s,e,w bounds to 90,-90,180,-180
>>> > - run g.setproj to rejig the location into a lat/lon one.
>>
>> umm, that might not work -- r.info will still know the map is XY even
>> if the location is changed to lat/lon.
>>
>>> > - check resolution is correct (nicely "0:01:20") with r.info.
>>> > - zoom to area of interest. you probably do not want to reproject
>>> >   entire planet. after zooming check resolution is preserved,
>>> >   (g.region -p, maybe with "g.region res=0:01:20 -a" after zoom to fix)
>>> >   and run "r.mapcalc cropmap=fullmap" to perform the crop.
>>> >
>>> > then from the lambert location run r.proj to pull the
>>> > cropped image across.
>>> >
>>> > there are some examples of this process in the GRASS wiki,
>>> > look at the "Global datasets" page.
>>
>> the above issue should be covered there; also check the mailing list
>> archives.
>>
>> so your "easiest" solution is to create a "world file". see the GDAL
>> JPG or GeoTiff format import page, or do a web search for instructions.
>
> Grass-6.3.0 under Mac doesn't seem to be checking for the world file.
>
> My test:
>
> 1) Export a raster using r.out.tiff with the "create world file" box checked
>
> 2) Check the output folder:
>
> test.tiff
> test.tfw

> 3) Import using r.in.gdal:
>
> r.in.gdal input=test.tiff output=test_2
>
> In mine, this produces a projection mismatch error - which seems to tell me
> that Grass isn't noticing the tfw file.

We would need more details to better understand the problem.
What does gdalinfo report on the file? (GRASS calls GDAL to read
the files).

Markus


More information about the grass-user mailing list