MrSID files: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
Line 59: Line 59:
Step one: NAD83 HARN to NAD83
Step one: NAD83 HARN to NAD83


<pre>
'''/usr/local/LizardTech/GeoExpress8/bin/mrsidgeoencoder -of mg3 -lossless -towkt NAD_1983_StatePlane_Oregon_North_FIPS_3601.prj -i 11s5w34f_color_ne.sid -o 11s5w34f_color_ne_nad83.sid'''
'''/usr/local/LizardTech/GeoExpress8/bin/mrsidgeoencoder -of mg3 -lossless -towkt NAD_1983_StatePlane_Oregon_North_FIPS_3601.prj -i 11s5w34f_color_ne.sid -o 11s5w34f_color_ne_nad83.sid'''
Using local license
Using local license
Input file name: 11s5w34f_color_ne.sid
Input file name: 11s5w34f_color_ne.sid
Output file name: 11s5w34f_color_ne_nad83.sid
Output file name: 11s5w34f_color_ne_nad83.sid
Output format: MrSID Generation 3
Output format: MrSID Generation 3
Estimated memory required: 33.7 MB
Estimated memory required: 33.7 MB
Encoder version: 8.0.0.3065.Bob_3062_br
Encoder version: 8.0.0.3065.Bob_3062_br
Encode start time: Tue Apr 12 10:20:36 2011
Encode start time: Tue Apr 12 10:20:36 2011
Encode finish time: Tue Apr 12 10:23:09 2011
Encode finish time: Tue Apr 12 10:23:09 2011
Total encode time: 2 minutes, 33 seconds
Total encode time: 2 minutes, 33 seconds
Input image size: 314.7 MB (329941728 bytes)
Input image size: 314.7 MB (329941728 bytes)
Output file size: 21.1 MB (22090751 bytes)
Output file size: 21.1 MB (22090751 bytes)
Encode ratio: 14.94:1 (lossless)
Encode ratio: 14.94:1 (lossless)
Data Cartridge not decremented
Data Cartridge not decremented
</pre>


Step two: NAD83 to NAD27
Step two: NAD83 to NAD27


<pre>
'''/usr/local/LizardTech/GeoExpress8/bin/mrsidgeoencoder -of mg3 -lossless -towkt NAD_1927_StatePlane_Oregon_North_FIPS_3601.prj -i 11s5w34f_color_ne_nad83.sid -o 11s5w34f_color_ne_nad27.sid'''
'''/usr/local/LizardTech/GeoExpress8/bin/mrsidgeoencoder -of mg3 -lossless -towkt NAD_1927_StatePlane_Oregon_North_FIPS_3601.prj -i 11s5w34f_color_ne_nad83.sid -o 11s5w34f_color_ne_nad27.sid'''
Using local license
Using local license
Input file name: 11s5w34f_color_ne_nad83.sid
Input file name: 11s5w34f_color_ne_nad83.sid
Output file name: 11s5w34f_color_ne_nad27.sid
Output file name: 11s5w34f_color_ne_nad27.sid
Output format: MrSID Generation 3
Output format: MrSID Generation 3
Estimated memory required: 33.7 MB
Estimated memory required: 33.7 MB
Encoder version: 8.0.0.3065.Bob_3062_br
Encoder version: 8.0.0.3065.Bob_3062_br
Encode start time: Tue Apr 12 10:23:11 2011
Encode start time: Tue Apr 12 10:23:11 2011
Encode finish time: Tue Apr 12 10:25:28 2011
Encode finish time: Tue Apr 12 10:25:28 2011
Total encode time: 2 minutes, 17 seconds
Total encode time: 2 minutes, 17 seconds
Input image size: 314.7 MB (329941728 bytes)
Input image size: 314.7 MB (329941728 bytes)
Output file size: 21.1 MB (22090809 bytes)
Output file size: 21.1 MB (22090809 bytes)
Encode ratio: 14.94:1 (lossless)
Encode ratio: 14.94:1 (lossless)
Data Cartridge not decremented
Data Cartridge not decremented
</pre>


Results: Same as one step. Still wrong.
Results: Same as one step. Still wrong.

Revision as of 18:12, 12 April 2011

MrSID is a proprietary compressed image file format of LizardTech It has become very popular for GIS files, especially orthophotos because it is efficient and (can be) lossless.

LizardTech provides a free decoder. It is available for Windows, Linux and Solaris. It will convert MrSID images to JPG, GeoTIFF image formats. It can also scale images, extract part of an image, and a few other things. This makes it possible to use MrSID images in programs that do not support directly reading it.

Lately I have been using GDAL a fair bit, and LizardTech also supplies a decoder that can be incorporated into GDAL at build time, so that you can read MrSID rasters with the GDAL tools. I have tested it on Linux. Works great.


Testing LizardTech tools

Reprojection with datum shift fails

Input: Corvallis air photo in SID format

Output: reprojected SID using mrsidgeoencoder (21 MB) (Command runs but image is shifted.)

Output: IMG file using ArcGIS 9.3.1 (300 MB) Raster Reproject (Works correctly.)

Note, ArcGIS output is in IMG format because ArcGIS cannot write SID.

MrSID command and output (command in bold):

/usr/local/LizardTech/GeoExpress8/bin/mrsidgeoencoder \
-of mg3 -lossless -towkt NAD_1927_StatePlane_Oregon_North_FIPS_3601.prj \
-i 11s5w34f_color_ne.sid -o  11s5w34f_color_ne_nad27.sid
Using local license
Input file name: 11s5w34f_color_ne.sid
Output file name: 11s5w34f_color_ne_nad27.sid
Output format: MrSID Generation 3
Estimated memory required: 33.7 MB
Encoder version: 8.0.0.3065.Bob_3062_br
Encode start time: Mon Apr 11 15:53:06 2011
Encode finish time: Mon Apr 11 15:55:46 2011
Total encode time: 2 minutes, 40 seconds
Input image size: 314.7 MB (329941728 bytes)
Output file size: 21.1 MB (22090787 bytes)
Encode ratio: 14.94:1 (lossless)
Data Cartridge not decremented

ArcGIS command:

I used the same WKT projection file to do both reprojections. Here is a copy of that file. NAD_1927_StatePlane_Oregon_North_FIPS_3601.prj

Screenshot of results

Note that in the top image, the streets do not align with the reprojected image. It appears that the image is still in NAD1983 projection.

ArcGIS ArcMAP 9.3.1 project file

Street shapefile.

Testing a two step reprojection

Step one: NAD83 HARN to NAD83

/usr/local/LizardTech/GeoExpress8/bin/mrsidgeoencoder -of mg3 -lossless -towkt NAD_1983_StatePlane_Oregon_North_FIPS_3601.prj -i 11s5w34f_color_ne.sid -o 11s5w34f_color_ne_nad83.sid
Using local license
Input file name: 11s5w34f_color_ne.sid
Output file name: 11s5w34f_color_ne_nad83.sid
Output format: MrSID Generation 3
Estimated memory required: 33.7 MB
Encoder version: 8.0.0.3065.Bob_3062_br
Encode start time: Tue Apr 12 10:20:36 2011
Encode finish time: Tue Apr 12 10:23:09 2011
Total encode time: 2 minutes, 33 seconds
Input image size: 314.7 MB (329941728 bytes)
Output file size: 21.1 MB (22090751 bytes)
Encode ratio: 14.94:1 (lossless)
Data Cartridge not decremented

Step two: NAD83 to NAD27

/usr/local/LizardTech/GeoExpress8/bin/mrsidgeoencoder -of mg3 -lossless  -towkt NAD_1927_StatePlane_Oregon_North_FIPS_3601.prj -i 11s5w34f_color_ne_nad83.sid -o 11s5w34f_color_ne_nad27.sid
Using local license
Input file name: 11s5w34f_color_ne_nad83.sid
Output file name: 11s5w34f_color_ne_nad27.sid
Output format: MrSID Generation 3
Estimated memory required: 33.7 MB
Encoder version: 8.0.0.3065.Bob_3062_br
Encode start time: Tue Apr 12 10:23:11 2011
Encode finish time: Tue Apr 12 10:25:28 2011
Total encode time: 2 minutes, 17 seconds
Input image size: 314.7 MB (329941728 bytes)
Output file size: 21.1 MB (22090809 bytes)
Encode ratio: 14.94:1 (lossless)
Data Cartridge not decremented

Results: Same as one step. Still wrong.