Jul 16, 2011

Batch merge CanVec shapefiles with gdal(ogr2ogr)

What the script does
I couldn't find a solution to batch merging CanVec shapefiles so I made my own script to run in the Ubuntu terminal.

The only extra program the script uses is GDAL. So I had to make sure GDAL/ogr2ogr was installed on my Ubuntu machine.

This script was actually my first Bash Script ever (not the batch downloader). It has a lot of bad practices that I have improved on since then, but in its current form works!

I will update the script once I get all my stuff settled into my place (moving...)

It will start by asking you for a workspace where it can create a folder called 'shp' and some subfolders: pt, ln and ply.

The zip file contents are then extracted to the shp folder.
Only the required shapefile parts are unzipped: .shp, .shx, .dbf, .prj
The script ignores the metadata or other unnecessary files for this process..

The shapefiles are then analyzed quickly for some feedback.

A single shapefile from each CanVec category is placed into a folder: pt, ln, ply
ogr2ogr requires a source shapefile to merge all other similar shapefiles to.

Source shapfiles are then appropriately renamed and the batch merging begins!

CanVec Batch Downloader (Bash Script)

I use to use Filezilla (and still do actually, but not for this...) to batch download CanVec GIS data.

Recently I found a new method using a bash script I put together. It's one of two scripts where the second uses ogr2ogr and batch merges the CanVec data into shapefiles.

The batch download script takes a list of NTS sheets in CSV format, makes you a workspace and begins downloading the CanVec data (or Geobase DEMs) and I'll cover the method I use to format these from a DBF to get them ready for this process.

It basically involves stripping the DBF of its header and reducing it to a single column with no special characters.

The formatting is all done in OpenOffice.org Base.

Jul 15, 2011

indiGenIS - Area of Interest and CanVec (Base Data)

Treaty No. 8 in British Columbia
I have to select an Area Of Interest ('AOI') for indiGenIS and a map projection...

This will be the general extent of the basemap for my GIS which will be a subset of Treaty 8 focusing on the western portion as it intersects British Columbia.

Jun 29, 2011

The Yukon/Klondike Gold rush and the 'All Canadian Route'

Source (non CC): Toronto Litho Co. Ltd., "Map Showing Route from Edmonton to Yukon River...", Library and Archives Canada, (I) NMC-197728, (II) NMC-197729, (III) NMC-197730 - Powered by Zoomify

Keyboard Shortcuts:

Shift (+ zoom)
Ctrl (- zoom)
Arrow Keys (pan)

Background - Quick and Dirty
The Klondike or Yukon Gold rush started in the late 1800's.

There was a frenzy of 'stampeders' racing for fortune to the remote north. Their target was an area around Rabbit Creek which later was more appropriately named Bonanza Creek. It was gold most were after.

Jun 25, 2011

Real-Time Hydrometric Data (and historical!)

It had already been raining for a good day I think when I got to work Thursday morning, Jun 23 2011.

First thing I did was open my emails to see if anything needed to get done right away and then checked my Google Reader for the latest CBC news from British Columbia.

Weather warnings seen on CBC news articles (online).