Automatic Generation, Cleaning and
Generalization of 50k Contours for
NRCan's Geospatial Database (GDB)
Johann Levesque
Project Officer
April 20, 2012
Etienne Bonhomme
Project Officer
Overview
 Background
 Objectives
 What’s the problem!
 How did we solve it?
 Workspaces Overview
 Examples
 Did we succeed?
 What’s next?
 Questions
Background
 14 000 map titles for NRCan’s National
Topographic Series (NTS)
 4000 of them still have imperial contours
 800 don’t have contours (never published)
 Contours are the essence of a Topographic Map
 Essential to complete the mapping of the North =
National Coverage
Objectives
 Generate clean contours using one source = Canadian
Digital Elevation Data (CDED)
 Complete the Mapping of the North by April 2012
 Increase productivity by automating the process
 Reduce the manual editing by reversing the ratios…
 80% editing 20% machine
 90% machine 10% editing (ideally!!!)
And of course with limited resources!
What’s the problem!
 In fact, it’s many problems…
 Self intersection
 Contours crossing
 Contours in water
 Ugly contours
 And many more…
How did we solve it…
 Using !
Validation
33 workspaces = 5-6 hours processing
14 workspaces = 1 hour processing
Opalis
Edition
Contour
Creation
Inspection Delivery
GDAL: raw
contours
ArcGIS ArcGIS SDE DB: clean
contours
Automatic
Cleaning
6 workspaces
53 workspaces!!!
Workspaces Overview
 Load and delete
 Format conversion
 Report creation
 Fill and change attributes
 Simple data manipulation
 Loop and embedded custom transformer
 Complex data manipulation
 Embedded python script
Include lakes into CDED
 Problematic
 CDED and Hydrography does not fit all the time
 Hydrography is not always classified as lake
 Solution
 Find lakes with statistics (area, length, CDED elevation)
 Set lakes flat with a buffer around them
 Recreate the CDED
 Bonus
 Reduce to almost zero intersections with lakes
Amalgamate contours
 Problematic
 Small isolations = noise
 Bad data structure
 Solution
 Restructure the data then amalgamate the
contours (Python and Shapely done by Centre for
Topographic Information – Sherbrooke)
 Bonus
 Gives clean data with less structure problems
Neatline vertices cleaning
 Problematic
 Data specification
 No vertices within 5 meters of the neatline
 Small portion of contour
 Surface creation problems
 Solution
 Find vertices in error (list)
 Loop trough the list and remove them
 Bonus
 Clean data
 Minimize support (following workspaces run fine)
Surface creation
 Problematic
 Not able to set elevation point attributes automatically
 Not able to set contour attributes automatically
 Solution
 Create surfaces with contours and neatline
 Find type of surface with CDED
 Bonus
 Attributes are set automatically
 We save hours of editing on huge file
Create contours on summit
 Problematic
 Can miss contour on summit to include elevation
point
 Use circle or same contour with negative buffer
 Solution
 Find summit
 Use CDED to find the best shape
 Bonus
 Better contours
 All attributes set automatically
Adjust re-entrance
 Problematic
 Linear rivers does not match the CDED
 Solution
 Set linear rivers orientation with CDED
 Move contours to fit rivers (Python and Shapely
done by Centre for Topographic Information –
Sherbrooke)
 Bonus
 Correct small re-entrance problems automatically.
Re-entrance can be 25% of overall errors
Neatline snapping
 Problematic
 Contours does not connect to the corresponding
contours on adjacent map
 Solution
 Find matching contours on both side
 Snap them and check for intersection
 Bonus
 Operators does not have to tie them manually
 Can save moving hundreds of lines
Did we succeed?
 We think so!
 We are around 65% machine-35% editing. Pretty
good… We think we can do better
 We have beaten our April deadline by 3 weeks
 Analysis on 14 files (before and after)
 Mean number of errors before: 1452
 Mean number of errors after: 508
 Reduction of 65%
Did we succeed?
What’s next?
 We think we can achieve 80% machine 20%
editing when we solve the hydro intersection
problem (double line and single line rivers).
 To reach 90% machine 10% would require better
data. There is so much fudging we can do…
Thank You!
 Questions?
 For more information:
 Johann Levesque
 Johann.Levesque@NRCan-RNCan.gc.ca
 Natural Resources Canada
 WWW.GEOGRATIS.GC.CA
 WWW.GEOBASE.CA
Error report sample
Simple data manipulation
Complex data manipulation
Include Lake into CDED
Amalgamate Contours
Neatline vertices cleaning
Create Surface
Create Contour on Summit
Adjust Reentrance
Neatline Snapping

Automatic Generation Cleaning & Generalization of 50 Contours for NRCan's Geospatial Database

  • 1.
    Automatic Generation, Cleaningand Generalization of 50k Contours for NRCan's Geospatial Database (GDB) Johann Levesque Project Officer April 20, 2012 Etienne Bonhomme Project Officer
  • 2.
    Overview  Background  Objectives What’s the problem!  How did we solve it?  Workspaces Overview  Examples  Did we succeed?  What’s next?  Questions
  • 3.
    Background  14 000map titles for NRCan’s National Topographic Series (NTS)  4000 of them still have imperial contours  800 don’t have contours (never published)  Contours are the essence of a Topographic Map  Essential to complete the mapping of the North = National Coverage
  • 5.
    Objectives  Generate cleancontours using one source = Canadian Digital Elevation Data (CDED)  Complete the Mapping of the North by April 2012  Increase productivity by automating the process  Reduce the manual editing by reversing the ratios…  80% editing 20% machine  90% machine 10% editing (ideally!!!) And of course with limited resources!
  • 6.
    What’s the problem! In fact, it’s many problems…  Self intersection  Contours crossing  Contours in water  Ugly contours  And many more…
  • 7.
    How did wesolve it…  Using ! Validation 33 workspaces = 5-6 hours processing 14 workspaces = 1 hour processing Opalis Edition Contour Creation Inspection Delivery GDAL: raw contours ArcGIS ArcGIS SDE DB: clean contours Automatic Cleaning 6 workspaces 53 workspaces!!!
  • 8.
    Workspaces Overview  Loadand delete  Format conversion  Report creation  Fill and change attributes  Simple data manipulation  Loop and embedded custom transformer  Complex data manipulation  Embedded python script
  • 9.
    Include lakes intoCDED  Problematic  CDED and Hydrography does not fit all the time  Hydrography is not always classified as lake  Solution  Find lakes with statistics (area, length, CDED elevation)  Set lakes flat with a buffer around them  Recreate the CDED  Bonus  Reduce to almost zero intersections with lakes
  • 10.
    Amalgamate contours  Problematic Small isolations = noise  Bad data structure  Solution  Restructure the data then amalgamate the contours (Python and Shapely done by Centre for Topographic Information – Sherbrooke)  Bonus  Gives clean data with less structure problems
  • 11.
    Neatline vertices cleaning Problematic  Data specification  No vertices within 5 meters of the neatline  Small portion of contour  Surface creation problems  Solution  Find vertices in error (list)  Loop trough the list and remove them  Bonus  Clean data  Minimize support (following workspaces run fine)
  • 12.
    Surface creation  Problematic Not able to set elevation point attributes automatically  Not able to set contour attributes automatically  Solution  Create surfaces with contours and neatline  Find type of surface with CDED  Bonus  Attributes are set automatically  We save hours of editing on huge file
  • 13.
    Create contours onsummit  Problematic  Can miss contour on summit to include elevation point  Use circle or same contour with negative buffer  Solution  Find summit  Use CDED to find the best shape  Bonus  Better contours  All attributes set automatically
  • 14.
    Adjust re-entrance  Problematic Linear rivers does not match the CDED  Solution  Set linear rivers orientation with CDED  Move contours to fit rivers (Python and Shapely done by Centre for Topographic Information – Sherbrooke)  Bonus  Correct small re-entrance problems automatically. Re-entrance can be 25% of overall errors
  • 15.
    Neatline snapping  Problematic Contours does not connect to the corresponding contours on adjacent map  Solution  Find matching contours on both side  Snap them and check for intersection  Bonus  Operators does not have to tie them manually  Can save moving hundreds of lines
  • 16.
    Did we succeed? We think so!  We are around 65% machine-35% editing. Pretty good… We think we can do better  We have beaten our April deadline by 3 weeks  Analysis on 14 files (before and after)  Mean number of errors before: 1452  Mean number of errors after: 508  Reduction of 65%
  • 17.
  • 18.
    What’s next?  Wethink we can achieve 80% machine 20% editing when we solve the hydro intersection problem (double line and single line rivers).  To reach 90% machine 10% would require better data. There is so much fudging we can do…
  • 19.
    Thank You!  Questions? For more information:  Johann Levesque  Johann.Levesque@NRCan-RNCan.gc.ca  Natural Resources Canada  WWW.GEOGRATIS.GC.CA  WWW.GEOBASE.CA
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.