CreateContourMap

Creates a topographic map that portrays differences in terrain elevation by connecting points of equal elevation with contour lines or by coloring terrain according to varying altitudes. The contour palettes and/or contour lines can be applied to a specified rectangular area, or to the entire terrain using the CoverageArea property of the resulting IContourMap80 object.

 

JavaScript

 

 

 

CreateContourMap(

       UpperLeftX,

       UpperLeftY,

       LowerRightX,

       LowerRightY,

       DisplayStyle,

       PaletteID,

       GroupID,

       Description)

 

C#

 

 

 

IContourMap80 CreateContourMap(

       double UpperLeftX,

       double UpperLeftY,

       double LowerRightX,

       double LowerRightY,

       ContourDisplayStyle DisplayStyle = ContourDisplayStyle.CDS_CONTOUR_STYLE_COLORS,

       string PaletteID = "",

       string GroupID = "",

       string Description = "")

 

C++

 

 

 

HRESULT CreateContourMap(

       double UpperLeftX,

       double UpperLeftY,

       double LowerRightX,

       double LowerRightY,

       ContourDisplayStyle DisplayStyle,

       BSTR PaletteID,

       BSTR GroupID,

       BSTR Description,

       IContourMap80** pIContourMap80)

 

Parameters

UpperLeftX

The West-East coordinate of the contour map’s upper left corner in the project’s coordinate system units.

UpperLeftY

The North-South coordinate of the contour map’s upper left corner in the project’s coordinate system units.

LowerRightX

The West-East coordinate of the contour map’s lower right corner in the project’s coordinate system units.

LowerRightY

The North-South coordinate of the contour map’s lower right corner in the project’s coordinate system units.

DisplayStyle

An enum that determines how the contour map is displayed. The following are the possible values:

·          CDS_CONTOUR_STYLE_DEFAULT = -1,

·          CDS_CONTOUR_STYLE_LINES = 0 – Displays contour lines at set elevation values.

·          CDS_CONTOUR_STYLE_COLORS = 1 - Represents varying altitudes in different colors according to the selected color scheme.

·          CDS_CONTOUR_STYLE_LINES_AND_COLORS = 2 - Displays both contour lines and contour colors

PaletteID

The GUID for the palette. GUIDs are listed in the palette XMLs found in the Pseudo directory, which is located under the [TerraExplorer installation]\Lang\1033 folder and under %APPDATA%\Skyline\TerraExplorer.

Note:    1033 is the English language directory. If you are running TerraExplorer in a different language, the Pseudo folder will be located under your language directory.

This parameter is applied only when the DisplayStyle property is set to CDS_CONTOUR_STYLE_COLORS or CDS_CONTOUR_STYLE_LINES_AND_COLORS.

GroupID                                                                                                                              

The Project Tree group in which the contour map object is created. If it is set to an empty string, the object is created under the root. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

Description

The name of the contour map object as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.

Return Value

pIContourMap80

An IContourMap80 representing the newly created contour map object.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.