[GRASSLIST:8208] Re: MrSID and incorporating the .sdw info into resulting GeoTiff.

Richard Greenwood richard.greenwood at gmail.com
Thu Sep 8 09:13:21 EDT 2005


On 9/7/05, Craig Aumann <caumann at ualberta.ca> wrote:
> I have a bunch of .sid files that I am converting to GeoTiffs.   How
> does one incorporate the spatial location information in their
> associated .sdw file into the associate .tiff file?
> 
> 
> Here's what I am doing:
> 
> mrsiddecode -i FILE.sid -o FILE.tif -of tifg
> 
> ## Use the code for NAD27, Zone 12
> ## contained in EPSG file: /usr/share/proj/epsg
> 
> gdal_translate -of GTIFF -a_srs '+init=epsg:26712' \
>         FILE.tif FILE.NAD27.tif
> 
> But when I do a gdalinfo, it is clear that the information in the .sdw
> file has not been used (the "file.sdw" is given below):
> 
> gdalinfo file.tif
> Driver: GTiff/GeoTIFF
> Size is 9168, 9168
> Coordinate System is:
> PROJCS["NAD27 / UTM zone 12N",
>     GEOGCS["NAD27",
>         DATUM["North_American_Datum_1927",
>             SPHEROID["Clarke 1866",6378206.4,294.9786982138982,
>                 AUTHORITY["EPSG","7008"]],
>             AUTHORITY["EPSG","6267"]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree (supplier to define
> representation)",0.01745329251994328],
>         AUTHORITY["EPSG","4267"]],
>     PROJECTION["Transverse_Mercator"],
>     PARAMETER["latitude_of_origin",0],
>     PARAMETER["central_meridian",-111],
>     PARAMETER["scale_factor",0.9996],
>     PARAMETER["false_easting",500000],
>     PARAMETER["false_northing",0],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]],
>     AUTHORITY["EPSG","26712"]]
> Origin = (-0.500000,9167.500000)
> Pixel Size = (1.00000000,-1.00000000)
> Corner Coordinates:
> Upper Left  (      -0.500,    9167.500) (115d29'19.33"W,  0d 4'57.69"N)
> Lower Left  (  -0.5000000,  -0.5000000) (115d29'19.32"W,  0d 0'0.02"S)
> Upper Right (    9167.500,    9167.500) (115d24'23.63"W,  0d 4'57.72"N)
> Lower Right (    9167.500,      -0.500) (115d24'23.61"W,  0d 0'0.02"S)
> Center      (    4583.500,    4583.500) (115d26'51.47"W,  0d 2'28.84"N)
> 
> 
> ----------------------------------------------
> 
> The associated .sdw file is:
>              1.200000000000000
>              0.000000000000000
>              0.000000000000000
>             -1.200000000000000
>         492501.000000000000000
>        6243621.000000000000000
> 

Try renaming the .sdw file to .tfw

Also try gdalinfo on the file.tif to be sure that the original reference system
is "seen".

Regards,
-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com




More information about the grass-user mailing list