GDAL tools of the trade: GDAL, MrSid, and nearblack revisited

Back in 2011 I wrote a post about GDAL, translating MrSID files and trimming off the artifacts so mosaics work. I’m revisiting some similar work this week and realized I had lost my copy of FWTools that can deal with MrSIDs. The Internet Archive came to the rescue. At some point LizardTech licensed a DLL that allowed for compilation compatible with FWTools licensing so we could … Continue reading GDAL tools of the trade: GDAL, MrSid, and nearblack revisited

gdal_calc.py– Raster Calculator using Numby Functions

gdal_calc is a python script that makes it easy to do band math and logical operations with gdal/numby. This ranges from basic arithemtic operations to logical functions. And while gdal_calc.py has been around since 2008, it is but is a recent and revelatory discovery for me. I had just today resigned myself to properly learning python so as to use the gdal bindings. But, my … Continue reading gdal_calc.py– Raster Calculator using Numby Functions

GDAL, MrSid, and nearblack

Translating MrSid lossy compressed files into uncompressed imagery has its drawbacks, including licensing and artifacts. Old versions of fwtools, which includes the GDAL utilities (and more), were compiled with a license that allowed for the translation of MrSid into e.g. Erdas Imagine images or GeoTiff. The licensing changed on that library, so FWTools and MS4W don’t do this anymore. If you have a compiled version … Continue reading GDAL, MrSid, and nearblack

Historical USGS Quads

This will be a very quick post today.  We wanted to use some historical USGS quads for analysis.  We had a ready source, used ArcGIS to georeference them to a grid, but then wanted something approaching a seamless product. Enter gdal. First step, create an image to put the mosaic into: gdal_merge -o usgs_merge.tif -createonly input1.tif input2.tif … Then mosaic into that.  Since we have … Continue reading Historical USGS Quads

Batch processing resampling of DEMs

Yet again, working with that Ohio DEM dataset, I need some reduced resolution versions of the 2.5 foot DEMs.  At a grand total of ~600 DEMs for a given county, it was time to batch, this time in Windows Command prompt.  The neat thing is the variable substitution in the for-in-do command in the command prompt, where, e.g. for a file variable %f, the file … Continue reading Batch processing resampling of DEMs