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.



Source (non CC): Aboriginal Affairs and Northern Development Canada - Powered by Zoomify

I received a shapefile from the Treaty 8 Tribal Association showing Treaty 8 in British Columbia and it came projected in BC Albers Equal Area Projection which I think uses the North American Datum (1983).

I like how that projection looks so I'm going to stick with it.


Treaty No. 8 Territory as it intersects British Columbia, Canada.

I will need some base data to start with and CanVec seems like as good a source as any. Getting data from CanVec will allow me to easily expand my study area because the data is both open to the public and provides coverage for the entire country.



CanVec
CanVec is a 1:50,000 topographic GIS dataset for the all of Canada. It is distributed through Geogratis in a couple of projected/GIS-ready formats.

It's a PITA to download for large areas and a daunting task to prepare it for use on a map or other purposes.

Luckily, I have devised some bash scripts that will both download and batch merge CanVec data into shapefiles.

I would like to allow topology checking that GDAL doesn't really do easily. I am going to develop a script that will batch import shapefiles into various formats like GRASS or a postgresql(postgis) database.




Generating an AOI with Quantum QIS (QGIS) 1.6
Creating an AOI around the Treaty 8 portion in BC was easy.

It involved a few steps:

(a) create an extent polygon from the T8 BC portion
(b) buffer that extent polygon by my desired distance
(c) create final extent polygon from buffer


Step (a)

In QGIS 1.6 you can generate a polygon extent with a built-in tool found from:
Vector > Research Tools > Polygon from layer extent
My input was the BC portion of Treaty 8.


Generating a polygon extent in QGIS from T8 BC.


Step (b)

From the QGIS menus again:
Vector > Geoprocessing Tools > Buffer(s)
My buffer distance is 100km.


Generating a 100km buffer in QGIS from the T8 BC extent polygon.


Step (c)

Following step (a), an extent polygon is made from my buffer:
Vector > Research Tools > Polygon from layer extent
This is necessary to straighten the edges and sharpen the corners


Generating an extent in QGIS from the T8 BC buffer polygon.


Showing the final extent polygon for the AOI!



Downloading the NTS Sheets - 50k
CanVec is distributed by the 50k sheet in shapefile format, province wide or nation wide. I am going to go after the 50k distribution method...

What that means is that you have to download the Vector Indexes of the National Topographic System of Canada.

This dataset is one I will be coming back to time and time again for all sorts of reasons. Especially when data mining.

The NTS sheets came nicely packaged in a zip file. It was easy to retrieve using wget:

wget ftp://ftp2.cits.rncan.gc.ca/pub/index/nts_snrc.zip
This dataset is where I got the provincial line-work in the maps at the beginning of the post

The data comes in a lat/lon coordinate system and with NTS sheets from all scales but I am only interested in the 50k sheets right now.

It needed to be re-projected to BC Albers so I could do a spatially correct select-by-location in QGIS.



Re-projecting a shapefile in QGIS

I add the 50k sheets to a project that has my T8 BC polygon.

On-the-fly CRS transformation is enabled to BC Albers so I can do the following:
Vector > Data Management Tools > Export to new projection
I was able to use a spatial reference system from an existing layer; Treaty 8 in BC.

The CRS Transformation is not necessary for the re-projection tool; it allowed the shapefile to render on top of existing data correctly prior to re-projecting in QGIS.


50k NTS Sheets overlaid on Treaty 8 BC.



Selecting a subset of data from an intersecting feature using QGIS
I can use the AOI to select the overlapping 50k NTS sheets using QGIS:
Vector > Research Tools > Select by location
I selected features from my 50k sheets that intersected the extent polygon.

961/19017 50k sheets were selected!

50k NTS sheets that intersect the indiGenIS AOI.

Selected features can be extracted into their own subset shapefile.

I started by right clicking my 50k_shp in the table of contents:
Right click > Save selection as...
That option will be greyed out if no features are selected!



The DBF file (attribute table) from this NTS 50k subset will tell me what 50k sheets I need from CanVec.

This DBF file will be formatted into a CSV table as an input in my Batch CanVec Data Downloader!

I am going to go over this process in the next post.

No comments:

Post a Comment