[mapguide-users] How do i load raster in MGOS 2?

Frank Warmerdam warmerdam at pobox.com
Tue Aug 5 12:39:51 EDT 2008


jamesdudden wrote:
> 
> Frank,
> 
> I would very much like to find out more about turning a TIFF into a geoTIFF
> - simply because so far a geoTIFF is all i have working.

James,

Unfortunately, I don't know the correct coordinate system for your image, so
I just give one example.  If you wanted to assign a UTM 11 WGS84 coordinate
system you could do it like this:

gdal_translate -a_srs "+proj=utm +zone=11 +datum=WGS84" -co COMPRESS=LZW
       SavillsSSETq12sw.tif SavillsSSETq12sw_geo.tif

I didn't see any compression on your source image, but being one bit
data it would likely shrink it considerably.

The -a_srs (assign spatial reference system) switch to gdal_translate
will allow you to specify the coordinate system in quite a few different
ways.  There is some additional discussion of this in the general options
section of:

   http://www.gdal.org/gdal_utilities.html

In this case we are assuming that gdal_translate will pick up the .tfw
when reading and will incorporate the georeferencing from it into the
resulting geotiff.  If it did not exist, you could also add the
-a_ullr commandline switch to assign upper left and lower right corner
coordinates.

More detail on the gdal_translate command is available at:

   http://www.gdal.org/gdal_translate.html

More details on the GDAL GeoTIFF driver options (like COMPRESS=LZW) are
available at:

   http://www.gdal.org/frmt_gtiff.html

Note that the FWTools Shell is a regular windows command window, but with
the environment carefully setup to use the FWTools tools and dlls.  You can
"cd" to other directories, etc.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapguide-users mailing list