[GRASS-user] Import/conversion problem

Adam Dershowitz, Ph.D., P.E. adershowitz at exponent.com
Fri Feb 11 16:56:49 EST 2011



On Feb 11, 2011, at 12:14 PM, Stuart Edwards wrote:

> I'm not familiar with the Kyngesburye plugin and haven't used gdalwarp, but here:
> 
>>>> I want to import it into a UTM zone 17 project.  So I did the following:
>>>> gdalwarp -t_srs '+proj=utm +zone=17 +datum=WGS84' input.sid output_utm.sid
> 
> it looks like you are just trying to create a new .sid file in zone 17 (output_utm.sid).  From the meta file at the MI source, I think the file is already projected in utm - probably in zone 17, and with units of 'meters'.  So what you maybe intended was to just create a .tiffg from the .sid so that it can be imported into GRASS.
> 
> In mrsiddecode (the app that does all the work inside the plugin - I assume) I would just issue the command
> 
> ./mrsiddecode -i Hancock.sid -o Hancock_south.tif -of tifg -ulxy 0 0 -lrxy 71145 29160  
> 
> where
> 
> -i - input
> -o - output
> -of - output file type
> ulxy - upper left x,y
> lrxy - lower right x,y
> 
> and you get a nice geotiff that r.in.gdal will recognize - already in utm zone 17 most likely.  Actually, in my case, the OH mrsids are projected in state plane coordinates but you get the picture.
> 
> To get the mrsiddecode app you must register at 
> 
> http://developer.lizardtech.com/ 
> 
> so you can access to the Mac version of the decoder and mrsidinfo download page.  And be slightly comfortable on the command line.
> 
> Stu
> 
> 

Nope, that's not doing it.  I downloaded mrsiddecode and ran it.  It nicely generates a geotiff.  But, if I try to import that I still get an error because the project is UTM, while the image is Oblique Mercator with omerc projection.  I tried to use gdalwarp to go from the geotiff to utm, but I get an error:

 gdalwarp -t_srs '+proj=utm +zone=17 +datum=WGS84'  oak_grove_sw.tifg oak_grove_sw_utm.tifg
ERROR 1: latitude or longitude exceeded limits
ERROR 1: Too many points (441 out of 441) failed to transform,
unable to compute output bounds.

If I run gdalinfo on the geotiff I get it looks to me like the projection has lat long near 0.  So, I don't think that the problem is a MrSID problem.  But instead there is just something wrong with how I am doing the projection, or something is wrong with the file itself.

Here is the output of gdalinfo oak_grove_sw.tifg:


Driver: GTiff/GeoTIFF
Files: oak_grove_sw.tifg
Size is 6415, 8061
Coordinate System is:
PROJCS["Projection = Oblique Mercator (Hotine)",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.2572221010002,
                AUTHORITY["EPSG","7019"]],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4269"]],
    PROJECTION["Hotine_Oblique_Mercator"],
    PARAMETER["latitude_of_center",0.9996],
    PARAMETER["longitude_of_center",0.9996],
    PARAMETER["azimuth",0.9996],
    PARAMETER["rectified_grid_angle",90],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",0.9996],
    PARAMETER["false_northing",0.9996],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (663144.500000000000000,240035.500000000000000)
Pixel Size = (1.000000000000000,-1.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  663144.500,  240035.500) (  6d57'27.03"E,  3d 9'14.09"N)
Lower Left  (  663144.500,  231974.500) (  6d57'25.53"E,  3d 4'52.96"N)
Upper Right (  669559.500,  240035.500) (  7d 0'53.76"E,  3d 9'12.88"N)
Lower Right (  669559.500,  231974.500) (  7d 0'52.24"E,  3d 4'51.77"N)
Center      (  666352.000,  236005.000) (  6d59'9.64"E,  3d 7'2.93"N)
Band 1 Block=6415x1 Type=Byte, ColorInterp=Red
Band 2 Block=6415x1 Type=Byte, ColorInterp=Green
Band 3 Block=6415x1 Type=Byte, ColorInterp=Blue

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110211/d11af8e8/attachment.html


More information about the grass-user mailing list