Reprocessing imagery with GDAL and BASH — and then cleaning up afterward

I show a simple example today of using gdal tools to change from raster to polygons with Bash.  That’s right.  Still no pythonista here.  I have poked ever so gently at the surface of ruby and rails recently, while watching another coder re-tune his brain to a new set of principles of least surprise. By the way, for my regular readers, please be patient with … Continue reading Reprocessing imagery with GDAL and BASH — and then cleaning up afterward

Reprocessing imagery with GDAL and BASH — and then cleaning up afterward

I just can’t seem to get away from Bash. One day I promise to do the same work with Python, but for now, the following will take your directory of 3-band imagery, extract the first band, and if it succeeds, delete your original file. Seeing as I had almost 300GB of imagery, and very little space left, this kind of housekeeping was necessary (my other … Continue reading Reprocessing imagery with GDAL and BASH — and then cleaning up afterward

gdal_warp, cutlines, and cwhere– simple tip for use on Linux

Mini GDAL tip of the day: gdalwarp, especially in combination with gdal_merge, is a powerful tool for doing all sorts on nice aggregation (read: mosaic’ing) of spatial raster data.  Unfortunately, at least with a google search, there’s very little to be found on demonstrating the use of queries in conjunction with cutlines, probably because in general these queries are not difficult to figure out. In … Continue reading gdal_warp, cutlines, and cwhere– simple tip for use on Linux

GDAL Slopes– Local Hydrologic Slope vs. the Standard Approach

Open Source software is not, of course just about warm and fuzzies, great support, rapid development cycles, shared costs, etc., it’s also about getting your hands dirty with someone else’s code and implementing stuff more quickly and more intelligently because of it, and hopefully learning something in the process.  You don’t have to poke under the hood to drive the car, but sometimes it’s nice … Continue reading GDAL Slopes– Local Hydrologic Slope vs. the Standard Approach

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

Mapping places unknown– free global datasets and FOSS GIS are a great combo

I wanted to put together a quick and dirty map of a biological reserve in Ecuador, sort of a laptop exploration of a place quite distant.  At first, I thought I’d use Shuttle Radar Topography Misssion data to get the elevation information.  Then I discovered the ASTER Global DEM which is 30m resolution for the whole world.  Wow.  Cool cool data. (I used the Japanese … Continue reading Mapping places unknown– free global datasets and FOSS GIS are a great combo

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