7.2.20 GM_LayerInfo_t
(1)声明
public class GM_LayerInfo_t
(2)属性
属性 | 描述 |
mArchiveFilename | 存档文件中的文件名(例如.zip或.tar.gz),从中加载图层,如果有的话(可能为空)。 |
mBandBitDepth | 仅限光栅/高程:每个波段值的位数。乘以mNumBands以获得每个样本的总位深度。 |
mBandValType | 仅限光栅/高程:波段的数据类型。 |
mCodePage | 图层中文本的代码页。0表示默认和当前活动的代码页(CP_ACP)。CP_UTF8用于UTF-8解释。 |
mControlPoints | 仅限光栅:地面控制点列表。指向GM_GroundControlPoint_t。 |
mDescription | 说明字符串。 |
mDfltViewGlobal | 图层在全局坐标中的默认视图边界矩形(通常与mGlobalRect相同) |
mElevUnits | 图层的高程单位。 |
mEnabled | 此图层是否启用显示或隐藏。 |
mExtraLoadFlags | 在加载期间由用户选择的附加加载标志。将这些传递给GM_LoadLayerListEx以记住选项。 |
mFilename | 加载图层的文件名(如果这是一个存档文件, 如.zip,那么实际加载的文件名将在mArchiveFilename中)。 |
mGlobalPixelHeight | 仅限光栅/高程:在当前投影中,实现1:1像素映射所需的高度的像素数估计值。 |
mGlobalPixelWidth | 仅限光栅/高程:在当前投影中,实现1:1像素映射所需的宽度的像素数估计值。 |
mGlobalRect | 图层在全局坐标中的边界矩形。 |
mGroupName | 图层所在的组名。没有组则为NULL。如果有多个级别,则使用<sep>分隔。 |
mHasRasterData | 此图层是否具有光栅或高程数据。 |
mHasVectorData | 此图层是否具有矢量数据(对于像地图目录这样的事物,要素计数可以都为0)。 |
mMaxElevation | 仅限高程:以米为单位的最大海拔。 |
mMetadataList | 图层的元数据属性和值列表。 |
mMinElevation | 仅限高程:以米为单位的最小高程。 |
mNativeProj | 图层的原生投影。 |
mNativeRect | 图层在原生坐标中的边界矩形。 |
mNumAreas | 仅限矢量:区域要素数。 |
mNumBands | 光栅图像中的波段数(使用GM_SetRasterDisplayOptions更改颜色波段布局)。 |
mNumLidarPoints | 仅限矢量:激光雷达点云点数(使用GM_GetLidarPoint获取)。 |
mNumLines | 仅限矢量:线要素数。 |
mNumPoints | 仅限矢量:点要素数。 |
mPalette | 基于调色板的光栅图层的调色板条目列表。 |
mParentLayer | 如果这是子图层(即来自目录或在线图层),则为父图层的句柄。所有顶级图层为NULL。 |
mPixelHeight | 仅限光栅/高程:图层的像素高度。 |
mPixelSizeX | 仅限光栅/高程:x方向上的像素大小(以米为单位)。 |
mPixelSizeY | 仅限光栅/高程:y方向上的像素大小(以米为单位)。 |
mPixelWidth | 仅限光栅/高程:图层的像素宽度。 |
mRasterTypeFlags | 光栅类型标志,指定光栅图层实际包含的数据类型。 |
mTypeName | 图层类型名称。 |
mUsedDefaultPos | 仅限光栅/高程:是否使用了默认位置,因为文件无法自动定位。 |
mUserData | 由用户通过GM_SetLayerUserData函数提供的与图层相关的自定义数据。 |
mUserText | 由用户通过GM_SetLayerUserText函数或从工作空间加载的与图层相关的自定义文本字符串。 |
mArchiveFilename
public string mArchiveFilename { get; }
mBandBitDepth
public ushort mBandBitDepth { get; }
mBandValType
public GM_BandValType_t8 mBandValType { get; }
mCodePage
public int mCodePage { get; }
mControlPoints
public GM_GroundControlPoint_t[] mControlPoints { get; }
mDescription
public string mDescription { get; }
mDfltViewGlobal
public GM_Rectangle_t mDfltViewGlobal { get; }
mElevUnits
public GM_ElevUnits_t8 mElevUnits { get; }
mEnabled
public bool mEnabled { get; }
mExtraLoadFlags
public string mExtraLoadFlags { get; }
mFilename
public string mFilename { get; }
mGlobalPixelHeight
public uint mGlobalPixelHeight { get; }
mGlobalPixelWidth
public uint mGlobalPixelWidth { get; }
mGlobalRect
public GM_Rectangle_t mGlobalRect { get; }
mGroupName
public string mGroupName { get; }
mHasRasterData
public bool mHasRasterData { get; }
mHasVectorData
public bool mHasVectorData { get; }
mMaxElevation
public float mMaxElevation { get; }
mMetadataList
public GM_AttrValue_t[] mMetadataList { get; }
mMinElevation
public float mMinElevation { get; }
mNativeProj
public GM_Projection_t mNativeProj { get; }
mNativeRect
public GM_Rectangle_t mNativeRect { get; }
mNumAreas
public uint mNumAreas { get; }
mNumBands
public uint mNumBands { get; }
mNumLidarPoints
public ulong mNumLidarPoints { get; }
mNumLines
public uint mNumLines { get; }
mNumPoints
public uint mNumPoints { get; }
mPalette
public GM_PaletteEntry_t[] mPalette { get; }
mParentLayer
public GM_Layer_t mParentLayer { get; }
mPixelHeight
public uint mPixelHeight { get; }
mPixelSizeX
public double mPixelSizeX { get; }
mPixelSizeY
public double mPixelSizeY { get; }
mPixelWidth
public uint mPixelWidth { get; }
mRasterTypeFlags
public GM_RasterTypeFlags_t32 mRasterTypeFlags { get; }
mTypeName
public string mTypeName { get; }
mUsedDefaultPos
public bool mUsedDefaultPos { get; }
mUserData
public IntPtr mUserData { get; }
mUserText
public string mUserText { get; }
7.2.21 GM_LayerList_t
(1)声明
public class GM_LayerList_t : IDisposable
(2)构造函数
//Default Constructor makes empty list with a specific capacity
public GM_LayerList_t(
int Capacity = 8 //Number of Elements to initialize with
)
//Default Constructor makes empty list with a specific capacity
public GM_LayerList_t(
GM_Layer_t aLayer, //The Layer to start the List with.
bool isReadOnly = false //Specifies whether or not the list will be read only
)
//Constructor to make a List from an array of Layers
public GM_LayerList_t(
GM_Layer_t[] theLayerList, //The List of GM_Layer to create the GM_LayerList from
bool isReadOnly = false //Will this GM_LayerList be Read Only
)
//Constructor to make a List from an array of Layers
public GM_LayerList_t(
GM_LayerList_t theLayerList, //The List of GM_Layer to create the GM_LayerList from
bool isReadOnly = false //Will this GM_LayerList be Read Only
)
(3)属性
属性 | 描述 |
Count | 列表中的图层数目。 |
IsFixedSize | 图层列表是否具有固定大小。 |
IsReadOnly | 图层列表是否只读。 |
Item | 获取所选索引处的图层。 |
(4)方法
方法 | 描述 |
Add | 将一个图层添加到列表中。 |
Clear | 从列表中移除所有图层。 |
Contains | 检查列表中是否包含给定的图层。 |
Dispose | 关闭列表中的所有图层。 |
Draw | 在给定位置将一个或多个图层绘制到提供的设备上下文中。 |
DrawLayerList | 在给定位置将一个或多个图层绘制到提供的设备上下文中。 |
DrawLayerListToMemory | 将指定图层的指定部分绘制到提供的内存缓冲区中。如果没有明确指定图层,则将绘制所有已加载的图层。 |
DrawToMemory | 将指定图层的指定部分绘制到提供的内存缓冲区中。如果没有明确指定图层,则将绘制所有已加载的图层。 |
Empty | 检查图层是否为空。 |
GetLoadedLayerList | 返回一个LayerHandles列表。 |
IndexOf | 返回给定图层的索引,如果未找到则返回-1。 |
Insert | 在给定索引处插入图层。 |
LoadLayerList | 从文件中加载图层。返回一个包含已加载图层句柄的列表的指针。可以使用aExtraLoadOptions字符串指定附加加载选项。 |
Remove | 移除给定的图层。 |
RemoveAt | 移除给定索引处的图层。 |
ShowOptionsDialog | 显示图层的显示选项对话框。 |
ToArray | 用于创建一个标准数组的项。 |
Add
public int Add(
GM_Layer_t aLayer //Layer Object to add
)
Clear
public void Clear()
Contains
public bool Contains(
GM_Layer_t aLayer //Layer object to check
)
Dispose
public void Dispose()
Draw
public GM_Error_t32 Draw(
IntPtr aDC, //OUT: count of layers in returned list
GM_DrawFlags_t32 aDrawFlags, //Flags controlling how the draw is performed
GM_Rectangle_t aWorldBounds, //World bounds to draw or NULL for all
int aLeftPixel, //Left pixel coordinate to draw to
int aTopPixel, //Top pixel coordinate to draw to
int aPixelWidth, //Width in pixels to draw
int aPixelHeight //Height in pixels to draw
)
DrawLayerList
public static GM_Error_t32 DrawLayerList(
IntPtr aDC, //OUT: count of layers in returned list
GM_LayerList_t aLayerList, //List of layers to draw or NULL for all
GM_DrawFlags_t32 aDrawFlags, //Flags controlling how the draw is performed
GM_Rectangle_t aWorldBounds, //World bounds to draw or NULL for all
int aLeftPixel, //Left pixel coordinate to draw to
int aTopPixel, //Top pixel coordinate to draw to
int aPixelWidth, //Width in pixels to draw
int aPixelHeight //Height in pixels to draw
)
DrawLayerListToMemory
public static GM_Error_t32 DrawLayerListToMemory(
GM_LayerList_t aLayerList, //(GM_LayerHandle_t32*)List of layers to draw or NULL for all
GM_DrawFlags_t32 aDrawFlags, //Flags controlling how the draw is performed
GM_Rectangle_t aWorldBounds, //(GM_Rectangle_t*) World bounds to draw or NULL for all
GM_ColorFormat_t32 aColorFormat, //Color format used in data buffer
int aPixelWidth, //Width in pixels to draw
int aPixelHeight, //Height in pixels to draw
IntPtr aDataBuf, //(void*) Buffer to hold output color data
int aRowWidthBytes //Width of a single row in the array in bytes
)
DrawToMemory
public GM_Error_t32 DrawToMemory(
GM_DrawFlags_t32 aDrawFlags, //Flags controlling how the draw is performed
GM_Rectangle_t aWorldBounds, //(GM_Rectangle_t*) World bounds to draw or NULL for all
GM_ColorFormat_t32 aColorFormat, //Color format used in data buffer
int aPixelWidth, //Width in pixels to draw
int aPixelHeight, //Height in pixels to draw
IntPtr aDataBuf, //(void*) Buffer to hold output color data
int aRowWidthBytes //Width of a single row in the array in bytes
)
Empty
public bool Empty()
GetLoadedLayerList
public static GM_LayerList_t GetLoadedLayerList()
IndexOf
public int IndexOf(
GM_Layer_t aLayer //Layer object to check
)
Insert
public void Insert(
int aIndex, //0 based location of the list to insert at
GM_Layer_t aLayer //The Layer to Insert into
)
LoadLayerList
public static GM_LayerList_t LoadLayerList(
string aFilename, //Name of the file to open
GM_LoadFlags_t32 aLoadFlags, //Flags used to load this layer
string aExtraLoadOptions = "" //Additional Options to be used
)
Remove
public void Remove(
GM_Layer_t aLayer //The Layer to Remove from the list
)
RemoveAt
public void RemoveAt(
int index //The index location to remove at
)
ShowOptionsDialog
public GM_Error_t32 ShowOptionsDialog()
ToArray
public GM_Layer_t[] ToArray()
7.2.22 GM_LidarClassInfo_t
(1)声明
public class GM_LidarClassInfo_t
(2)构造函数
//Default Constructor for a point feature style
public GM_LidarClassInfo_t()
//Constructor for a point feature style
public GM_LidarClassInfo_t(
GM_LidarClass_t8 aClass, //Classification
GM_LidarClassGroup_t16 aClassGroup, //Mask of group(s) the class is in
string aName, //Classification name (set to NULL to reset to default name in GM_SetLidarClassInfo)
Color aColor //Color to use for rendering class points
)
(3)方法
方法 | 描述 |
GetLidarClassInfo | 获取Lidar类别代码的信息(例如颜色、名称、分组)。 |
SetLidarClassInfo | 设置Lidar类别代码的信息(例如颜色、名称、分组)。 |
GetLidarClassInfo
public static GM_Error_t32 GetLidarClassInfo(
GM_LidarClass_t8 aLidarClass, //Lidar class to set info for
out GM_LidarClassInfo_t aClassInfo, //New type info to use for Lidar class
bool aGetDefault //Return default class info rather than current settings
)
SetLidarClassInfo
public static GM_Error_t32 SetLidarClassInfo(
GM_LidarClass_t8 aLidarClass, //Lidar class to set info for
GM_LidarClassInfo_t aClassInfo //New type info to use for Lidar class (null to restore default)
)
(4)字段
字段 | 描述 |
mClass | 分类。 |
mClassGroup | 类别所属的组的掩码。 |
mColor | 用于渲染类别点的颜色。 |
mName | 分类名称(如果设置为NULL,则重置为GM_SetLidarClassInfo中的默认名称)。 |