[GRASS-user] Off Topic: Importing GRASS tiffs to GMT

Hamish hamish_b at yahoo.com
Tue Apr 7 11:00:58 EDT 2009


Eric:
> I found a posting by Allen Cogbill on the GMT mailing list last night,
> and with a lot of clunky tweaking, worked for me:
> 
> 1. Convert the .tif file to a Sun Rasterfile (I use ImageMagick).

[
> 2. Use Unix tools to read the .tfw file that accompanies the .tif
> file and calculate the real-world coordinate extrema.
> 3. Using g.region or imagemagick's identify, list the number of rows
> and columns, and along with the image resolution, calculate
> the N-S-E-W extents.
> 4. Once real-world extents are known,
]

gdalinfo will do all that for you from the geotiff, or from g.region at
time of export.

beware the dreaded cell-center vs grid-center convention issues.

> use your psbasemap mapping scale to calculate image width and height
> on paper.
> 5. Pass this information to psimage -W.
> 
> As long as the region defined in psbasemap's -R flag is identical to
> the region of the generated tiff from GRASS, the image will plot
> correctly. 


Hamish



      



More information about the grass-user mailing list