Automatic Generation, Cleaning and Generalization of 50k Contours for NRCan's Geospatial Database (GDB)
Johann LevesqueProject Officer
April 20, 2012
Etienne BonhommeProject 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
EditionContourCreation
Inspection Delivery
GDAL: raw contours
ArcGIS ArcGIS SDE DB: clean contours
Automatic Cleaning
6 workspaces53 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 [email protected] 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