Facebook Twitter Gplus LinkedIn E-mail RSS
Home ArcGIS Desktop Decoding Sids
formats

Decoding Sids

Imagery. It’s a pain..or it used to be. I had the fun of being on the “cutting edge” of scanning in my old job. We flew a lot of photography, we ended up buying at least two different scanners, and we started creating out own orthoimagery. It was painful. We would decide on a resolution that balanced file size with practicality. Yes – I would like this at 1000 DPI but I’m only going to get it at 300 DPI. At some point we purchased a Mr Sid license. That relieved a lot of the pain as we were able to ortho and compress a quad sized block of imagery. Coupled with portable hard drives and we were rocking and rolling until someone dropped one.

Flash forward to now and I’m sitting with close to 2 terrabytes of space on my workstation. A lot of my imagery is brought in through various services. What isn’t brought in I download and stick on a portable hard drive and take with me to client locations.

This weekend I hit a bit of a problem. I had Mr Sid compressed NAIP and I needed to use it on my linux workstation – except I hadn’t compiled sod support into my workstation. So I did some investigating and came to a fairly elegant 15 minute solution.

1.Downloaded the Lizardtech tools and utilities and decided to decompress the sid image. It comes in both windows and linux flavors.

  • ./mrsidgeodecode -wf -i input.sid -o output.tif

2. Use GDAL to then jpeg compress and tile the tiff

  •  gdal_translate -of GTiff -co “TILED=YES” -co COMPRESS=JPEG input.tif output_tiled.tif

3. Use GDAL to then Build pyramid layers internal to the image.

  • gdaladdo -r nearest output_tiled.tif 2 4 6 8 16 32

So exactly what happend? Well – this did:

File File Size 
Original Mr. Sid File 402310123
Uncompressed Mr. Sid 6035447974
Jpeg compressed  591536492
Pyramid layers built 1033756302

So the file went from approximately 400 Mb to 1 GB in 15 minutes – that’s more or less a 2.5 times increase in size. It also displays pretty fast in QGIS and ArcGIS. ArcGIS appears to be reading the internal pyramids because it didn’t want to build any when added. Overall I think the display is a bit faster than the original Sid. I’m not the first to talk about this wizardry.

The point…well. I don’t much care for proprietary compression anymore (I’m looking at you ecw too). The imagery is now more “functional” for me – I can use it where ever. Does it justify decompressing my stash of imagery? Probably not. Should you think about this before you start dealing with imagery? Yes. Tif is a standard. Yes – Sid makes your life easier but you really need to understand you are essentially “locking” your imagery up to an extent.

For all of these steps – add the sid to ArcGIS and right click and export data – you skip the decompression portion with the sid utilities. You get close to the same file size as I did with jpeg compressed.

Anyway – problem solved this go around. Think. Learn.

2 Responses

  1. [...] today my friend Randy Hale at North River Geographic Systems Inc in Chattanooga posted this great overview of understanding what MrSID does to your imagery and compression. Thanks Randy. Fantastic [...]

  2. [...] today my friend Randy Hale at North River Geographic Systems Inc in Chattanooga posted this great overview of understanding what MrSID does to your imagery and compression. Thanks Randy. Fantastic [...]