20 Nov 2010 - Fairbanks (GINA)
This is a work related ramble.
I received a pile of GeoTIFFs and MrSid files to showing different processing options available for a data set. I need to display these various data sets in both overview and full resolution to select users for feedback. The collection of files is too large to just put on a USB stick and hand out to 30 or 40 people we want the feedback from (74GB of data).
…
MrSID is awkward to work with - GeoTIFF mmkay thx
GeoTIFF optimizations. Main goals: google projection, internal pyramid overviews built. But first a just get this AlaskaAlbers (yay for that at least) GeoTIFFS into a WMS.
Shove into the 900913 projection to avoid re-projection on the fly over head for the target clients (google maps/google earth). Just so it is clear, my epsg code file (share/proj/epsg) has the following for the 900913 projection :
<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@@@null +wktext no_defs <>@
blamo.rb */*/*.tif
Hey, what is blamo? Silly ruby script of course to simply things:
what did I do wrong there? I forgot to set the nodata values. The gdalwarp command should have included: @-dstnodata ‘0 0 0’@
Now each of those need overviews added to them so interacting with all of them at once won’t annihilate my computer. I’m about to cheat and use a secret tool made by spruceboy that he hasn’t published called @add_overviews.rb@. At the core is gdaladdo with the powers of 2 math automatically done. Pretty much same as above only applied to *_gm.tif
I’ve got my own organization system for WMS layers (part self inspired the rest at spruceboy’s direction). I’ll ignore all that and just show you what was required:
Nice and simple, all the fancy stuff for getting the huge pile of data organized hidden away in the @layers/histogram/*.map@
One of those looks like:
Once again, nice and simple. The magic for the tileindex comes from the @gdaltindex@ command. Ran that somewhat like:
Amazing magic complete. I’ve got a working WMS that I can point shiv at and that creates the magic Google maps tile interface I need to produce a google maps layer. Details of that setup another day.