I am working with the CANVEC data set. The data in canvec is broken up in to mapsheets. eg. 116B04. I have data covering the entire province of the Yukon. I have merged all the data in to one shapefile but I would like to take this further by creating one feature for each line of elevation within the entire dataset. I would like to do this so that I can display things a little quicker when I load it in to QGIS but dont want to turn it in to a raster so that I can switch labelling on and off to view elevation labels. I am thinking that creating one layer out of the entire dataset and one attribute entry for each elevation. eg. 1500ft, 2500ft, 3000ft. ect. I am using UBUNTU 13.10, QGIS, GRASS, POSTGIS. I would also like to do something similar for polygons that are split into parts because of the map tiles.
You need to use two tools in the "Vector / Geometry" menu:
- "Dissolve" the layer using the elevation field as the dissolve field. How well this works depends on how well the line endpoints match up at the tile boundaries. If the endpoints don't match well enough for the lines to dissolve together, then you can use the PostGIS-based fuzzy-matching procedure described in Merging adjacent polygons in shapefile that has been split at tile boundaries?
- Convert "Multipart to Singlepart" to separate distinct contours at the same elevation.
In QGIS: Try Vector->Geometry Tools->Singleparts to multipart (QGIS 2.8.3). In Unique ID field select 'xxxxx' elevation attribute of input shapefile. Result - multilinestring shapefile with unique 'elevation' attribute.