Map Data
Import contour and roughness data
//Load map file elevation contours in with an accompanying .prj file and fail
//if .prj is missing
Toolbox.ImportElevationContours(@"C:\TestData\terrain_and_roughness.map");
// Load map file elevation contours in current workbook projection
Toolbox.ImportElevationContours(
@"C:\TestData\terrain_and_roughness.map",
Workbook.Geography.Projection);
// Load map file elevation contours with supplied .prj file
var projection = Toolbox.LoadProjectionFromFile(@"C:\TestData\BritishGrid.prj");
Toolbox.ImportElevationContours(
@"C:\TestData\terrain_and_roughness.map",
projection);
// Load map file roughness contours with an accompanying .prj file and fail
// if .prj is missing
Toolbox.ImportRoughnessContours(@"C:\TestData\terrain_and_roughness.map");
Import elevation data
// Load elevation data in current workbook projection or with accompanying .prj file
Toolbox.ImportElevationGrid(@"C:\TestData\Demo.DTM");
// Load elevation data with specified projection
var projection = Toolbox.LoadProjectionFromFile(@"C:\TestData\BritishGrid.prj");
Toolbox.ImportElevationGrid(
@"C:\TestData\Demo.DTM",
projection);
Convert terrain contours to DTM
// Load map file in the current workbook projection
Toolbox.ImportElevationContours(
@"C:\TestData\terrain_and_roughness.map",
Workbook.Geography.Projection);
// Select the first elevation contour dataset in the workbook
ElevationContours contours = Workbook.Geography.Contours.FirstOrDefault();
// Convert terrain contours to grid with a 50 m resolution
Toolbox.AddElevationGrid(contours, 50);
Import background image
// Projection for UTM Zone 32N, EPSG = 32632
var projection = Toolbox.GetProjectionFromEpsgCode(32632);
// Loading background image with projection object. An accompanying .bmpw world file
// is necessary in the same folder
Toolbox.ImportBackgroundImage(
@"C:\TestData\DemoColourRefmap.bmp",
projection);
// Loading background image in workbook projection. An accompanying .bmpw world file
// is necessary in the same folder
Toolbox.ImportBackgroundImage(
@"C:\TestData\DemoColourRefmap.bmp",
Workbook.Geography.Projection);