Global Mapper SDK 19 中文开发文档(八)

7.2.8 GM_DBUtil

(1)声明
public static class GM_DBUtil
(2)方法
方法 描述
DBGetTableList 获取指定空间数据库中的表列表
DBIsDatabaseFile 指示输入文件是否为数据库(Esri地理数据库、Spatialite等)
DBMakeConnectionString 从输入连接参数创建连接字符串
DBSelectExportTable 显示对话框,允许用户选择要导出数据的表
DBSelectTable 显示对话框,允许用户选择一个或多个要加载的表
DBTableList_Free 释放与表列表关联的内存
DBTableList_GetCount 获取表列表中的表数
DBTableList_GetTableName 获取指定索引处的表名
DBTestConnection 测试输入的连接字符串,以查看是否可以用于连接到数据库
 DBGetTableList
public static GM_Error_t32 DBGetTableList(
	out IntPtr aTableList,    //Table list handle
	string aConnectionInfo    //Connection string or database file name
)
DBIsDatabaseFile
public static bool DBIsDatabaseFile(
	string aFileName    //The file name
)
DBMakeConnectionString
public static GM_Error_t32 DBMakeConnectionString(
	out string aConnectionStr,                //The connection string buffer
	uint aBufferLength,                       //The length of the connection string buffer
	GM_DBConnectionParams_t aConnectionParams //The connection parameters
)
DBSelectExportTable
public static GM_Error_t32 DBSelectExportTable(
	out string aTable,        //Buffer for storing table name
	uint aBufferLength,       //The length of the table name buffer
	out bool aTableExists,    //Indicates whether or not the selected table exists
	string aConnectionStr     //Connection parameter string or database file name
)
DBSelectTable
public static GM_Error_t32 DBSelectTable(
	out IntPtr aTableList,    //Handle for list of selected table names
	string aConnectionStr     //Connection parameter string or database file name
)
DBTableList_Free
public static GM_Error_t32 DBTableList_Free(
	ref IntPtr aTableList    //Table list handle to be freed
)
DBTableList_GetCount
public static GM_Error_t32 DBTableList_GetCount(
	out uint aCount,    //The number of table names in the list
	IntPtr aTableList   //Table list handle
)
DBTableList_GetTableName
public static GM_Error_t32 DBTableList_GetTableName(
	out string aTableName,    //Buffer in which table name will be placed
	uint aIndex,              //The zero-based index for the table name
	IntPtr aTableList         //Table list handle
)
DBTestConnection
public static GM_Error_t32 DBTestConnection(
	string aConnectionStr    //Connection parameter string
)

7.2.9 GM_Exception

(1)声明
public class GM_Exception : Exception
(2)构造函数
public GM_Exception()

public GM_Exception(
	string message    //Any additional error information that could be gathered
)

public GM_Exception(
	GM_Error_t32 error    //The GM_Error to be assosicated with this exception
)

public GM_Exception(
	string message,    //Any additional error information that could be gathered
	Exception inner    //The Inner Exception
)

public GM_Exception(
	GM_Error_t32 error,    //The GM_Error to be assosicated with this exception
	string message         //Any additional error information that could be gathered
)
(3)属性
属性 描述
ErrorCode 与异常相关的GM_Error Code
 ErrorCode
public GM_Error_t32 ErrorCode { get; }

7.2.10 GM_Export

(1)声明
public static class GM_Export
(2)方法
方法 描述
ExportElevation 将一个或多个图层导出为新的分块高程文件。
ExportElevationEx 将一个或多个图层导出为新的分块高程文件。
ExportMapLayoutComponent 将地图布局组件导出为位图图像文件。
ExportPackage 将一个或多个图层导出为新的包文件(在WinCE上未实现)。
ExportPDF 将一个或多个图层导出为新的GeoPDF文件(在WinCE上未实现)。
ExportRaster 将一个或多个图层导出为新的栅格文件(在WinCE上未实现)。
ExportRasterEx 将一个或多个图层导出为新的栅格文件(在WinCE上未实现)。
ExportRasterFromBitmap 将一个或多个图层导出为新的栅格文件(在WinCE上未实现)。
ExportVector 将一个或多个图层导出为新的矢量文件(在WinCE上未实现)。
ExportVectorList 将一个或多个图层导出为新的矢量文件(在WinCE上未实现)。
ExportWebFormat 将一个或多个图层导出为适用于在Web浏览器或其他基于Web的工具中显示的Web格式文件。  
SetExportCropAreas 在导出时设置要使用的裁剪区域。

 7.2.11 GM_ExportOptsPDF_t

(1)声明
public class GM_ExportOptsPDF_t
(2)构造函数
public GM_ExportOptsPDF_t()
(3)字段
方法 描述
mBorderColor 边框线颜色。
mBorderStyle 边框线样式(如实线、虚线等)。
mBorderWidth 边框线宽度(以PDF点为单位的像素)。
mDPI 导出DPI。
mFlags 导出标志。
mFooterFont 页脚字体(默认为NULL)。
mFooterStr 页面页脚(无页脚则为NULL)。
mHeaderFont 页眉字体(默认为NULL)。
mHeaderStr 页面页眉(无页眉则为NULL)。
mMarginRect 边距(以英寸为单位)。
mPageSizeName 页面大小名称,如“Letter”,“Legal”,“A0”等。
mSymbolScale 点符号缩放因子(0.0将被视为1.0,使用2.0可以将大小加倍,0.5可以减半等)。

7.2.12 GM_FindFeatures

(1)声明
public static class GM_FindFeatures
(2)方法
方法 描述
FindFeaturesInArea 查找包含在给定区域要素内的要素。
FindNearestAddress 查找离搜索位置最近的地址。
FindNearestFeatures 查找与给定像素位置的像素距离内的要素。
 FindFeaturesInArea
public static GM_Error_t32 FindFeaturesInArea(
	GM_LayerList_t aLayerList,                //List of layers to search or NULL for all vector layers
	GM_FindFlags_t32 aFindFlags,              //Flags controlling how the find is performed
	GM_AreaFeature_t aAreaToSearch,           //Area feature to search (use GM_GetAreaFeature to get from loaded layer)
	GM_Projection_t aAreaProj,                //Projection of coordinates in area feature (use GM_GetLayerInfo()->mNativeProj to get layer projection)
aResults
	out GM_FoundFeatureResults_t aResults,    //Results of find operation (use GM_FreeFeatureResultList to free when done)
	Object aReserved                          //Reserved for later use, must be NULL (0)
)
FindNearestAddress
public static GM_Error_t32 FindNearestAddress(
	GM_Point_t aSearchPt,        //Search location in current view projection (as returned by GM_SetProjection)
	GM_LayerList_t aLayerList,   //List of layers to search or NULL for all vector layers
	out string aAddressStr,      //Buffer to hold string for nearest address
	uint aMaxAddressLen,         //Maximum length of string to store in output
	double aMaxDistMeters,       //Maximum distance in meters to search around search point
	Object aReserved             //Reserved for later use, must be NULL (0)
)
FindNearestFeatures
public static GM_Error_t32 FindNearestFeatures(
	GM_Point_t aPixelSearchPt,                        //Search location in pixel coordinates
	GM_LayerList_t aLayerList,                        //List of layers to search or NULL for all vector layers
	GM_FindFlags_t32 aFindFlags,                      //Flags controlling how the find is performed
	GM_Rectangle_t aWorldBounds,                      //World bounds for search space or NULL for last drawn
	GM_PixelRect_t aPixelRect,                        //Pixel bounds for search space or NULL for last drawn
	out GM_FoundFeatureCollection_t aNearestFeatures, //List of nearest features (buffer for GM_FoundFeature_t)
	uint aMaxFeatures,                                //Max number of nearest features to find
	uint aMaxDistPixels                               //Max distance in pixels to search
)

7.2.13 GM_FontDef_t

(1)声明
public class GM_FontDef_t
(2)构造函数
public GM_FontDef_t()
(3)方法
方法 描述
ToString() 返回对象的字符串表示形式
(覆盖了Object.ToString()方法)。
ToString(String) 返回对象的字符串表示形式。
 ToString
public override string ToString()

public string ToString(
	string theOptions    //Additional Font Info: (A) for all, (C) for Color, (F) for Format, (O) for Other
)
(4)操作符
操作符 描述
Equality 根据句柄比较两个图层的相等性。
Inequality 根据句柄比较两个图层的不相等性。
Equality 

public static bool operator ==(
	GM_FontDef_t left,    //The Left Layer
	GM_FontDef_t right    //The Right Layer
)
Inequality
public static bool operator !=(
	GM_FontDef_t left,    //The Left Layer
	GM_FontDef_t right    //The Right Layer
)
(5)字段
字段 描述
mAngle 逆时针旋转角度(0表示从左到右水平)。
mBgMode 背景填充模式(不透明或透明)。
mCharset 字符集(使用OEM_CHARSET(255)获取默认行为)。
mColor 字体的RGB颜色。
mFaceName 使用的字体名称。
mFixedHgt 字体的固定高度(以米为单位)(使用0.0表示正常字号字体)。
mHalo 围绕文本绘制细边框,以在任何背景上使其可见。
mItalicize 使用斜体绘制文本。
mPlacement 标签相对于点要素的放置方式(仅适用于点要素)。
mPointSize 字体的字号(将mFixedHgt值设置为非零以使用固定高度)。
mReserved2 保留,必须为0。
mReserved3 保留,必须为0。
mStrikeout 删除线文本。
mUnderline 下划线文本。
mWeight 字体的粗细(使用GM_Constants,如FW_BOLD,FW_THIN,FW_NORMAL等)。

7.2.14 GM_FoundFeature_t

(1)声明
public class GM_FoundFeature_t
(2)属性
属性 描述
mDistance 距离搜索位置的特征像素距离(只读)。
mFeatureClassType 要素类别(区域、点、线)(只读)。
mFeatureIndex 要素在图层中的索引(只读)。
mLayer 要素所在的图层(只读)。
 mDistance
public uint mDistance { get; }
mFeatureClassType
public GM_FeatureClassType_t8 mFeatureClassType { get; }
mFeatureIndex
public uint mFeatureIndex { get; }
mLayer
public GM_Layer_t mLayer { get; }
(3)方法
方法 描述
CompareLayer 将此找到的图层与给定的图层进行比较。
CompareLayer 
public bool CompareLayer(
	GM_Layer_t aLayer    //The layer to compare against
)
(4)操作符
操作符 描述
Equality 检查两个找到的要素之间是否相等。
Inequality 检查两个找到的要素之间是否不相等。
 Equality
public static bool operator ==(
	GM_FoundFeature_t left,    //Left side feature to compare
	GM_FoundFeature_t right    //Right side feature to compare
)
Inequality
public static bool operator !=(
	GM_FoundFeature_t left,    //Left side feature to compare
	GM_FoundFeature_t right    //Right side feature to compare
)

7.2.15 GM_FoundFeatureCollection_t

(1)声明
public class GM_FoundFeatureCollection_t
(2)属性
属性 描述
Count 找到的要素数量。
Item 找到的要素列表。
Count
public int Count { get; }
Item
public GM_FoundFeature_t this[
	int index
] { get; }
(3)方法
方法 描述
GetAreas 从 FoundFeatureCollection 中获取所有区域要素的列表。
GetLidarPoints 从 FoundFeatureCollection 中获取所有激光雷达点要素的列表。
GetLines 从 FoundFeatureCollection 中获取所有线要素的列表。
GetPoints 从 FoundFeatureCollection 中获取所有点要素的列表。
 GetAreas
public GM_AreaFeature_t[] GetAreas(
	GM_GetFeatureFlags_t32 aFlags = 0    //Flags for the get area feature operation
)
GetLidarPoints
public GM_LidarPoint_t[] GetLidarPoints(
	GM_GetFeatureFlags_t32 aFlags = 0    //Flags for the get point feature operation
)
GetLines
public GM_LineFeature_t[] GetLines(
	GM_GetFeatureFlags_t32 aFlags = 0    //Flags for the get line feature operation
)
GetPoints
public GM_PointFeature_t[] GetPoints(
	GM_GetFeatureFlags_t32 aFlags = 0    //Flags for the get point feature operation
)

7.2.16 GM_FoundFeatureResults_t

(1)声明
public class GM_FoundFeatureResults_t : IDisposable
(2)属性
属性 描述
mFeatureCount 结果列表中的要素数量。
mFeatureCount 
public ulong mFeatureCount { get; }
(3)方法
方法 描述
Dispose 释放非托管资源。
 Dispose
public void Dispose()
(4)字段
字段 描述
mFeatureList 找到的要素列表。

7.2.17 GM_GPSUtil 

(1)声明
public static class GM_GPSUtil
(2)方法
方法 描述
GPSGetAltitude 获取当前的GPS海拔高度,如果有效。
GPSGetBearing 获取当前的GPS方位角,如果有效。
GPSGetFixInfo 获取当前的GPS定位准确性统计信息。
GPSGetFixType 获取当前的GPS定位类型。
GPSGetLocation 获取当前的GPS位置。
GPSGetTime 以C风格的时间加小数秒的形式获取最后一次GPS定位的UTC时间。
GPSGetVelocity 获取当前的GPS速度,如果有效。
GPSRenderVessel 在当前GPS位置将给定大小的GPS船舶渲染到提供的设备上下文中。
GPSStartTrackingNMEAFile 回放从NMEA日志文件中记录的GPS轨迹。
GPSStartTrackingSerial 开始跟踪连接到串行端口的GPS设备。
GPSStartTrackingUSB 开始跟踪连接到USB端口的GPS设备。
GPSStopTracking 停止跟踪任何已连接的GPS设备。
GPSGetAltitude
public static GM_Error_t32 GPSGetAltitude(
	out float aAltitude    //current GPS altitude in meters
)
GPSGetBearing
public static GM_Error_t32 GPSGetBearing(
	out float aBearing    //current GPS bearing in radians from due north
)
GPSGetFixInfo
public static GM_Error_t32 GPSGetFixInfo(
	out float aHorzPosError,    //current horizontal position error in meters (0.0 if unknown)
	out float aVertPosError,    //current vertical position error in meters (0.0 if unknown)
	out float aPDOP,            //current position DOP in meters (0.0 if unknown)
	out uint aNumSats           //number of satellites used in fix (0 if unknown)
)
GPSGetFixType
public static GM_gps_fix_t8 GPSGetFixType()
GPSGetLocation
public static GM_Error_t32 GPSGetLocation(
	out GM_Point_t aCurPos,    //current GPS location
	bool aGetLatLon            //retrieve coordinates in lat/lon/WGS84 rather than global coords
)
GPSGetTime
public static GM_Error_t32 GPSGetTime(
	out DateTime aFixTime    //fix time
)
GPSGetVelocity
public static GM_Error_t32 GPSGetVelocity(
	out float aVelocity    //current GPS velocity in m/s
)
GPSRenderVessel
public static GM_Error_t32 GPSRenderVessel(
	IntPtr aDC,                    //(HDC) Device context to draw to
	GM_Rectangle_t aWorldBounds,   //World bounds to convert from or NULL for last drawn
	GM_PixelRect_t aPixelRect,     //Pixel bounds to convert from or NULL for last drawn 
	uint aVesselHeight,            //The vessel height in pixels
	uint aVesselWidth,             //The vessel width in pixels
	uint aVesselColor              //The color to render the vessel in
)
GPSStartTrackingNMEAFile
public static GM_Error_t32 GPSStartTrackingNMEAFile(
	string aFilename,                    //full path to NMEA file to use
	GM_gps_nmea_flags_t32 aNmeaFlags,    //flags controlling NMEA playback
	GM_GPSCallbackFunc aCallbackFunc,    //optional callback function
	Object aReserved                     //reserved value (must be NULL)
)
GPSStartTrackingSerial
public static GM_Error_t32 GPSStartTrackingSerial(
	GM_gps_format_t8 aFormat,            //format (NMEA or Garmin)
	byte aPort,                          //COM port for serial connections
	uint aBaud,                          //baud rate for serial port
	GM_GPSCallbackFunc aCallbackFunc,    //optional callback function
	uint aReserved                       //32-bit reserved value (must be 0)
)
GPSStartTrackingUSB
public static GM_Error_t32 GPSStartTrackingUSB(
	GM_GPSCallbackFunc aCallbackFunc,     //optional callback function
	uint aReserved                        //32-bit reserved value (must be 0)
)
GPSStopTracking
public static GM_Error_t32 GPSStopTracking()

7.2.18 GM_GridGenSetup_t

(1)声明
public class GM_GridGenSetup_t
(2)构造函数
public GM_GridGenSetup_t()
(3)字段
字段 描述
mBounds (GM_Rectangle_t *)要将边界框网格化到当前的投影单位中。如果要使用所有输入图层的合并边界,则传递NULL(默认值)。
mDesc 网格描述
mElevUnits 在哪些单位上生成网格(如果需要,将转换其他单位的高程值)
mFlags 网格生成的标志
mGridAlg 用于创建高程网格的算法(如果有)
mGridBinMult 如果使用基于 bin 的网格方法,则使用网格 bin 倍数。这是计算点密度的倍数。
mLidarBreaklineBinMult 在应用断线高度和填充间隙之前,从Lidar网格周围清除的单元格数目(如果使用GM_GridGen_ApplyLidarBreaklines有效)。通常在1-4范围内。
mTaperValue 区域网格化的锥度值。 0.0表示无锥度(默认值)
mTightnessMult 网格紧密度乘数(乘以分辨率),以丢弃远离样本的值。默认值为零,不会丢弃任何值。对于Lidar bin网格化,通常不希望使用0,因为它可能会非常缓慢,以填充不规则的Lidar数据中的所有间隙。使用GM_GRID_DISABLE_GAP_FILL完全禁用填充间隙。对于Lidar bin网格,间隙填充值通常在1-32范围内。
mXRes 在当前的投影单位中生成网格的X分辨率(使用0.0进行自动间隔确定)
mYRes 在当前的投影单位中生成网格的Y分辨率(使用0.0进行自动间隔确定)

7.2.19 GM_Layer_t 

(1)声明
public class GM_Layer_t : IDisposable
(2)构造函数
public GM_Layer_t(
	string aFilename,                //The Path to the file to be loaded
	GM_LoadFlags_t32 aLoadFlags = 0  //Flags for load options
)
(3)属性
属性 描述
Closed 返回图层的关闭状态。
Closed 
public bool Closed { get; }
(4)方法
方法 描述
AddAreaToVectorLayer 向加载的矢量图层添加区域要素
AddLineToVectorLayer 向加载的矢量图层添加点要素
AddPointToVectorLayer 向加载的矢量图层添加点要素
Close 关闭图层并清理非托管代码。返回GM_Error_t32
CombineTerrainLayers 通过组合两个加载的地形网格图层创建一个新的地形图层(在WinCE上未实现)
CreateCustomElevGridLayer 创建一个用于内存高程网格的新的自定义图层(在WinCE上未实现)
CreateCustomRasterLayer 创建一个用于内存栅格网格的新的自定义图层(在WinCE上未实现)
CreateCustomVectorLayer 创建一个用于添加矢量要素的新的自定义图层
CreateVectorLayerFromFindResults 根据查找操作的结果创建一个新的矢量图层
Dispose 与Close执行相同的操作
Draw 将指定图层的指定部分绘制到DIB中。如果没有显式指定图层,则将绘制所有加载的图层。
Equals 根据句柄比较两个图层的相等性(重写Object.Equals(Object)。)
FlushCache 刷新图层的任何内存缓存(在低内存环境中非常有用)
GetAreaFeature 获取指定索引处具有可选标志的该图层中的区域要素。
GetAreaFeatureEx 获取指定索引处具有可选标志的该图层中的区域要素。
GetAvailableOnlineSourceList 检索所有可用的在线源的列表
GetFeatureElevation 获取要素的高程。使用SetLayerElevationAttribute设置高程属性的名称。
GetLayerInfo 返回有关指定图层的信息的副本。如果图层未加载,则返回NULL。
GetLayerLidarStats 从Lidar图层检索统计数据
GetLidarPoint 从图层中检索给定索引处的Lidar点要素
GetLineFeature 以可选标志获取该图层中指定索引处的线要素
GetLineFeatureEx 以可选标志获取该图层中指定索引处的线要素
GetLocationColor(Double, Double, GM_Color_t) 从提供的图层或当前加载的栅格和高程图层列表(最顶层图层优先)中的给定位置检索颜色
GetLocationColor(GM_Layer_t, Double, Double, GM_Color_t) 从提供的图层或当前加载的栅格和高程图层列表(最顶层图层优先)中的给定位置检索颜色
GetLocationElevation(Double, Double, Single) 从提供的图层或当前加载的高程图层列表(最顶层高程图层优先)中的给定位置检索高程
GetLocationElevation(GM_Layer_t, Double, Double, Single) 从提供的图层或当前加载的高程图层列表(最顶层高程图层优先)中的给定位置检索高程
GetOnlineSourceInfo 获取有关在线源的详细信息并检查可用性
GetPixelBandValue(Int32, Int32, Int32, Int32) 从提供的图层中检索给定像素位置的波段值
GetPixelBandValue(GM_Layer_t, Int32, Int32, Int32, Int32) 从提供的图层中检索给定像素位置的波段值
GetPixelColor(Int32, Int32, GM_Color_t) 从提供的图层中检索给定像素位置的颜色
GetPixelColor(GM_Layer_t, Int32, Int32, GM_Color_t) 从提供的图层中检索给定像素位置的颜色
GetPixelColorRow(Int32,Color[], Color) 从提供的图层中检索整行颜色值
GetPixelColorRow(GM_Layer_t, Int32,Color[], Color) 从提供的图层中检索整行颜色值
GetPixelElevation(Int32, Int32, Single) 从提供的图层中检索给定像素位置的高程
GetPixelElevation(GM_Layer_t, Int32, Int32, Single) 从提供的图层中检索给定像素位置的高程
GetPixelElevationRow(Int32,Single[], Single) 从提供的图层中检索整行高程值
GetPixelElevationRow(GM_Layer_t, Int32,Single[], Single) 从提供的图层中检索整行高程值
GetPointFeature 使用可选标志获取该图层中指定索引处的点要素的副本
GetPointFeatureEx 使用可选标志获取该图层中指定索引处的点要素的副本
IsFeatureDeleted 查询图层中给定索引处要素的删除状态
LoadGenericAsciiTextLayer 从简单的ASCII文本文件中加载新的图层。将指向该图层的指针存储以便后续调用使用。
LoadLayer 加载数据文件(已弃用)
LoadOnlineLayer 从在线源(如WMS服务器或TerraServer-USA)加载数据
LoadRectifiedLayer 从文件中加载新的图层。将指向该图层的指针存储以便后续调用使用。该图层将使用提供的地面控制点和投影进行校正。
RepositionLayer 重新定位/重投影先前加载的栅格图层
SetAreaFeatureClass 设置给定要素使用的分类。
SetAreaFeatureDrawStyle 设置用于区域要素的绘制样式
SetAreaFeaturePointList 设置用于给定区域要素的点位置列表
SetAreaFeaturePointListEx 设置用于给定区域要素的点位置列表,包括每个顶点的高程。
SetCodePage 设置图层的代码页解释
SetFeatureAttrList 设置用于指定要素的属性值列表。
SetFeatureDelete 更改图层中给定索引处要素的删除状态
SetFeatureDescription 设置要素使用的描述。
SetFeatureLabel 设置要素使用的显示标签。
SetLayerDescription 设置图层的描述
SetLayerElevationAttribute 设置用于检索该图层内要素的高程值的属性名称。
SetLayerElevationUnits 设置用于没有高程单位的3D矢量要素的高程单位
SetLayerEnabled 设置给定图层是否启用显示。如果禁用,该图层将永远不会被绘制,也不会用作其他半透明或贴图图层的输入。
SetLayerHeightAttribute 设置用于从该图层内获取点要素的高度值的属性名称。
SetLayerHeightUnits 设置用于没有高度单位的3D矢量要素的高度单位
SetLayerLabelAttribute 设置用于设置该图层内要素显示标签的属性名称。
SetLayerPalette 为图层设置自定义调色板,以覆盖现有调色板。仅适用于基于调色板的图层。
SetLayerUserData 为图层设置用户数据。
SetLayerUserText 为图层设置用户文本。保存到工作空间后仍保持不变。
SetLidarPoint 设置给定索引处从该图层中获取的Lidar点要素
SetLineFeatureClass 设置给定要素使用的分类。
SetLineFeatureDrawStyle 设置用于线要素的绘制样式
SetLineFeaturePointList 设置用于给定线要素的点位置列表
SetLineFeaturePointListEx 设置用于给定线要素的点位置列表,包括高程列表。
SetPointFeatureClass 设置给定要素使用的分类。
SetPointFeatureDrawStyle 设置用于点要素的绘制样式
SetPointFeaturePosition 设置用于给定点要素的位置
ShowOptionsDialog 显示图层的显示选项对话框
ToString 返回对象的字符串表示形式(重写Object.ToString()方法)
AddAreaToVectorLayer
public GM_Error_t32 AddAreaToVectorLayer(
	GM_AreaFeature_t aArea,         //Area feature to add
	GM_AddFeatureFlags_t8 aFlags    //Flags controlling the add
)
AddLineToVectorLayer
public GM_Error_t32 AddLineToVectorLayer(
	GM_LineFeature_t aLine,        //Line feature to add
	GM_AddFeatureFlags_t8 aFlags   //Flags controlling the add
)
AddPointToVectorLayer
public GM_Error_t32 AddPointToVectorLayer(
	GM_PointFeature_t aPoint,    //Point feature to add
	GM_AddFeatureFlags_t8 aFlags //Flags controlling the add
)
Close
public GM_Error_t32 Close()
CombineTerrainLayers
public static GM_Layer_t CombineTerrainLayers(
	GM_GridCombineSetup_t aSetup,    //Setup for operation
	Object aReserved                 //Reserved for future use, must be NULL
)
CreateCustomElevGridLayer
public static GM_Layer_t CreateCustomElevGridLayer(
	string aDescription,            //Description to use for layer (can be NULL to use default)
	GM_Projection_t aProj,          //Native projection of new layer
	GM_GridLayout_t aGridLayout,    //Grid layer layout and type
	IntPtr aElevGrid,               //Grid of elevation values in row-major order
	Object aReserved                //Reserved for future use (must be NULL)
)
CreateCustomRasterLayer
public static GM_Layer_t CreateCustomRasterLayer(
	string aDescription,                //Description to use for layer (can be NULL to use default)
	GM_Projection_t aProj,              //Native projection of new layer
	GM_RasterLayout_t aRasterLayout,    //Raster layer layout
	IntPtr aDataBuf                     //Grid of raster data values in row-major order
)
CreateCustomVectorLayer
public static GM_Layer_t CreateCustomVectorLayer(
	string aDescription,    //Description to use for layer (can be NULL to use default)
	GM_Projection_t aProj   //Native projection of new layer
)
CreateVectorLayerFromFindResults
public static GM_Layer_t CreateVectorLayerFromFindResults(
	string aDescription,                    //Description to use for layer (can be NULL to use default)
	GM_Projection_t aProj,                  //Native projection of new layer
	GM_FoundFeatureResults_t aResultList    //Results of find operation to create layer from
)
Dispose
public void Dispose()
Draw
public GM_Error_t32 Draw(
	IntPtr aDC,                    //Device context to draw to
	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
)
Equals
public override bool Equals(
	Object obj    //The layer to compare to this one
)
FlushCache
public GM_Error_t32 FlushCache()
GetAreaFeature
public GM_AreaFeature_t GetAreaFeature(
	uint aIndex    //Index of Area feature to retrieve
)
GetAreaFeatureEx
public GM_AreaFeature_t GetAreaFeatureEx(
	uint aIndex,                    //Index of Area feature to retrieve
	GM_GetFeatureFlags_t32 aFlags,  //Flags for fetching feature
	Object aReserved                //Reserved for future use, must be NULL
)
GetAvailableOnlineSourceList
public static GM_OnlineSourceInfo_t[] GetAvailableOnlineSourceList()
GetFeatureElevation
public GM_Error_t32 GetFeatureElevation(
	GM_FeatureClassType_t8 aFeatureClassType,    //Type of feature class (area, point, line)
	uint aFeatureIndex,                          //Index of feature in layer
	out float aElev                              //Elevation of feature (in meters)
)
GetLayerInfo
public GM_LayerInfo_t GetLayerInfo()
GetLayerLidarStats
public GM_Error_t32 GetLayerLidarStats(
	out GM_LidarStats_t aLidarStats,    //Buffer to hold stats in
	Object aReserved                    //Reserved for future use, must be NULL
)
GetLidarPoint
public GM_Error_t32 GetLidarPoint(
	ulong aPointIndex,                //Index of Lidar point feature to retrieve
	out GM_LidarPoint_t aLidarPoint,  //Lidar point to fill in
	GM_GetFeatureFlags_t32 aFlags,    //Flags for fetching Lidar point
	Object aReserved                  //Reserved for future use, must be NULL
)
GetLineFeature
public GM_LineFeature_t GetLineFeature(
	uint aIndex    //Index of Line feature to retrieve
)
GetLineFeatureEx
public GM_LineFeature_t GetLineFeatureEx(
	uint aIndex,                    //Index of Line feature to retrieve
	GM_GetFeatureFlags_t32 aFlags,  //Flags for fetching feature
	Object aReserved                //Reserved for future use, must be NULL
)
GetLocationColor
public GM_Error_t32 GetLocationColor(
	double aXCoord,        //X coord in current projection
	double aYCoord,        //Y coord in current projection
	out GM_Color_t aColor  //Color of pixel at location
)

public static GM_Error_t32 GetLocationColor(
	GM_Layer_t aLayer,     //Layer to get color from or NULL for topmost
	double aXCoord,        //X coord in current projection
	double aYCoord,        //Y coord in current projection
	out GM_Color_t aColor  //Color of pixel at location
)
GetLocationElevation
public GM_Error_t32 GetLocationElevation(
	double aXCoord,    //X coord in current projection
	double aYCoord,    //Y coord in current projection
	out float aElev    //Elevation at location in meters
)

public static GM_Error_t32 GetLocationElevation(
	GM_Layer_t aLayer,    //Layer to get elevation from or NULL for topmost
	double aXCoord,       //X coord in current projection
	double aYCoord,       //Y coord in current projection
	out float aElev       //Elevation at location in meters
)
GetOnlineSourceInfo
public static GM_Error_t32 GetOnlineSourceInfo(
	string aSourceName,                      //Name of online source to get detail info for
	out GM_OnlineSourceInfo_t aSourceInfo,   //Detailed information about provided source, mostly in attributes
	Object aReserved                         //Reserved for future use, must be NULL
)
GetPixelBandValue
public GM_Error_t32 GetPixelBandValue(
	int aRow,        //Y coord of pixel (0 is topmost)
	int aCol,        //X coord of pixel (0 is leftmost)
	int aBand,       //Band to get value for (0-based, so first band is 1)
	out int aVal     //Color of pixel at location 
)

public static GM_Error_t32 GetPixelBandValue(
	GM_Layer_t aLayer,    //Layer to get color from
	int aRow,             // Y coord of pixel (0 is topmost)
	int aCol,             //X coord of pixel (0 is leftmost)
	int aBand,            //Band to get value for (0-based, so first band is 1)
	out int aVal          //Color of pixel at location 
)
GetPixelColor
public GM_Error_t32 GetPixelColor(
	int aRow,                //Y coord of pixel (0 is topmost)
	int aCol,                //X coord of pixel (0 is leftmost)
	out GM_Color_t aColor    //Color of pixel at location
)

public static GM_Error_t32 GetPixelColor(
	GM_Layer_t aLayer,        //Layer to get color from
	int aRow,                 //Y coord of pixel (0 is topmost)
	int aCol,                 //X coord of pixel (0 is leftmost)
	out GM_Color_t aColor     //Color of pixel at location
)
GetPixelColorRow
public GM_Error_t32 GetPixelColorRow(
	int aRow,                //Y coord of pixel (0 is topmost)
	out Color[] aColorRow,   //Pointer to arrow to hold color values for row
	Color aInvalidVal        //Value to use for invalid pixels
)

public static GM_Error_t32 GetPixelColorRow(
	GM_Layer_t aLayer,        //Layer to get color from
	int aRow,                 //Y coord of pixel (0 is topmost)
	out Color[] aColorRow,    //Pointer to arrow to hold color values for row
	Color aInvalidVal         //Value to use for invalid pixels
)
GetPixelElevation
public GM_Error_t32 GetPixelElevation(
	int aRow,        //Y coord of pixel (0 is topmost)
	int aCol,        //X coord of pixel (0 is leftmost)
	out float aElev  //Elevation at location in meters
)

public static GM_Error_t32 GetPixelElevation(
	GM_Layer_t aLayer,    //Layer to get elevation from
	int aRow,             //Y coord of pixel (0 is topmost)
	int aCol,             //X coord of pixel (0 is leftmost)
	out float aElev       //Elevation at location in meters
)
GetPixelElevationRow
public GM_Error_t32 GetPixelElevationRow(
	int aRow,                //Y coord of pixel (0 is topmost)
	out float[] aElevRow,    //Buffer to hold elevation values for row in meters
	float aInvalidVal        //Value to use for invalid samples (i.e. -9999.9)
)

public static GM_Error_t32 GetPixelElevationRow(
	GM_Layer_t aLayer,        //Layer to get elevation from
	int aRow,                 //Y coord of pixel (0 is topmost)
	out float[] aElevRow,     //Buffer to hold elevation values for row in meters
	float aInvalidVal         //Value to use for invalid samples (i.e. -9999.9)
)
GetPointFeature
public GM_PointFeature_t GetPointFeature(
	uint aIndex    //Index of Point feature to retrieve
)
GetPointFeatureEx
public GM_PointFeature_t GetPointFeatureEx(
	uint aIndex,                    //Index of Point feature to retrieve
	GM_GetFeatureFlags_t32 aFlags,  //Flags for fetching feature
	Object aReserved                //Reserved for future use, must be NULL
)
IsFeatureDeleted
public GM_Error_t32 IsFeatureDeleted(
	GM_FeatureClassType_t8 aFeatureClassType,    //Type of feature class (area, point, line)
	uint aFeatureIndex,                          //Index of feature in layer
	out bool aIsDeleted                          //Returns TRUE if marked as deleted, FALSE if not
)
LoadGenericAsciiTextLayer
public static GM_Layer_t LoadGenericAsciiTextLayer(
	string aFilename,                    //filename of ASCII file to load
	GM_LoadFlags_t32 aLoadFlags,         //load flags
	GM_AsciiFormatInfo_t aFormatInfo,    //optional format info (use NULL to prompt user)
	GM_Projection_t aProj                //optional projection to use for file (use NULL to prompt user)
)
LoadLayer
public static GM_Layer_t LoadLayer(
	string aFilename,                //The Path to the file to be loaded
	GM_LoadFlags_t32 aLoadFlags = 0  //Flags for load options
)
LoadOnlineLayer
public static GM_Layer_t LoadOnlineLayer(
	string aSourceName,            //name of the TerraServer-USA theme or WMS source to load ("drg", "doq", etc.) or NULL to ask user
	GM_Rectangle_t aLatLonRect,    //lat/lon rect to import (NULL to ask user)
	string aExtraLoadOptions       //extra load options
)
LoadRectifiedLayer
public static GM_Layer_t LoadRectifiedLayer(
	string aFilename,                    //File to be loaded
	GM_LoadFlags_t32 aLoadFlags,         //Flags to set load options
	GM_GroundControlPoint_t[] aGCPList,  //(const GM_GroundControlPoint_t*) list of control points for layer
	GM_Projection_t aProj                //projection of control points
)
RepositionLayer
public GM_Error_t32 RepositionLayer(
	GM_GroundControlPoint_t[] aGCPList,    //new control points. Null to not modify
	GM_Projection_t aProj                  //projection of control points
)
SetAreaFeatureClass
public GM_Error_t32 SetAreaFeatureClass(
	uint aFeatureIndex,                    //Index of feature in layer
	AreaFeatureClass_t16 aFeatureClass     //New feature class to assign to feature
)
SetAreaFeatureDrawStyle
public GM_Error_t32 SetAreaFeatureDrawStyle(
	uint aFeatureIndex,        //Index of feature in layer
	GM_AreaStyle_t aAreaStyle  //New style to use for Area, pass null to restore default type-based stuff
)
SetAreaFeaturePointList
public GM_Error_t32 SetAreaFeaturePointList(
	uint aFeatureIndex,        //Index of feature in layer
	uint aHoleIndex,           //Index of hole to apply locations to (0 for main parent area, 1 for first hole, etc.)
	GM_Point_t[] aPointList,   //New list of points for area
	bool aPosInLayerCoords     //Are the position in the layer coordinate system or the current coordinate system
)
SetAreaFeaturePointListEx
public GM_Error_t32 SetAreaFeaturePointListEx(
	uint aFeatureIndex,         //Index of area in layer
	uint aHoleIndex,            //Index of hole to apply locations to (0 for main parent area, 1 for first hole, etc.)
	GM_Point_t[] aPointList,    //(const GM_Point_t*) New list of points for area
	bool aPosInLayerCoords,     //Are the position in the layer coordinate system or the current coordinate system
	float[] aElevList           //Per-vertex elevations for area feature, or NULL for none
)
SetCodePage
public GM_Error_t32 SetCodePage(
	int aCodePage    //Code page to use (-1 for not set, 0 for current system, CP_UTF8 for UTF-8, or normal code page, like 1252, 936, etc.)
)
SetFeatureAttrList
public GM_Error_t32 SetFeatureAttrList(
	GM_FeatureClassType_t8 aFeatureClassType,    //Type of feature class (area, point, line)
	uint aFeatureIndex,                          //Index of feature in layer
	GM_AttrValue_t[] aAttrList                   //New list of attributes to associate with feature
)
SetFeatureDelete
public GM_Error_t32 SetFeatureDelete(
	GM_FeatureClassType_t8 aFeatureClassType,    //Type of feature class (area, point, line)
	uint aFeatureIndex,                          //Index of feature in layer
	bool Delete                                  //Use TRUE to mark as deleted, FALSE to clear delete flag
)
SetFeatureDescription
public GM_Error_t32 SetFeatureDescription(
	GM_FeatureClassType_t8 aFeatureClassType,    //Type of feature class (area, point, line)
	uint aFeatureIndex,                          //Index of feature in layer
	string aDesc                                 //New description for feature (NULL to reset to default)
)
SetFeatureLabel
public GM_Error_t32 SetFeatureLabel(
	GM_FeatureClassType_t8 aFeatureClassType,    //Type of feature class (area, point, line)
	uint aFeatureIndex,                          //Index of feature in layer
	string aLabel                                //New display label for feature
)
SetLayerDescription
public GM_Error_t32 SetLayerDescription(
	string aDesc    //Description to use (pass NULL to restore default)
)
SetLayerElevationAttribute
public GM_Error_t32 SetLayerElevationAttribute(
	string aAttrName,    //Name of attribute to use for elevations
	uint aReserved       //Reserved value for future expansion (must be zero)
)
SetLayerElevationUnits
public GM_Error_t32 SetLayerElevationUnits(
	GM_ElevUnits_t8 aElevUnits    //Elevation units to interpret values as
)
SetLayerEnabled
public GM_Error_t32 SetLayerEnabled(
	bool aEnable    //Enable or disable the layer
)
SetLayerHeightAttribute
public GM_Error_t32 SetLayerHeightAttribute(
	string aAttrName,    //Name of attribute to use for height
	uint aReserved       //Reserved value for future expansion (must be zero)
)
SetLayerHeightUnits
public GM_Error_t32 SetLayerHeightUnits(
	GM_ElevUnits_t8 aHeightUnits    //Height units to interpret values as
)
SetLayerLabelAttribute
public GM_Error_t32 SetLayerLabelAttribute(
	string aAttrName,    //Name of attribute to use for naming labels
	uint aReserved       //Reserved value for future expansion (must be zero)
)
SetLayerPalette
public GM_Error_t32 SetLayerPalette(
	GM_PaletteEntry_t[] aNewPalette,    //pointer to list of palette entries to use for layer or NULL to reset palette to original palette
	Object aReserved                    //reserved for future use, must be NULL
)
SetLayerUserData
public GM_Error_t32 SetLayerUserData(
	IntPtr aUserData    //User data pointer/value to associate with layer
)
SetLayerUserText
public GM_Error_t32 SetLayerUserText(
	string aUserText    //Text string to set as text for layer
)
SetLidarPoint
public GM_Error_t32 SetLidarPoint(
	ulong aPointIndex,            //Index of Lidar point feature to update
	GM_LidarPoint_t aLidarPoint,  //Lidar point to update
	Object aReserved              //Reserved for future use, must be NULL
)
SetLineFeatureClass
public GM_Error_t32 SetLineFeatureClass(
	uint aFeatureIndex,                    //Index of feature in layer
	LineFeatureClass_t16 aFeatureClass     //New feature class to assign to feature
)
SetLineFeatureDrawStyle
public GM_Error_t32 SetLineFeatureDrawStyle(
	uint aFeatureIndex,        //Index of feature in layer
	GM_LineStyle_t aLineStyle  //New style to use for line, pass null to restore default type-based stuff
)
SetLineFeaturePointList
public GM_Error_t32 SetLineFeaturePointList(
	uint aFeatureIndex,        //Index of feature in layer
	GM_Point_t[] aPointList,   //New list of points for line
	bool aPosInLayerCoords     //Are the position in the layer coordinate system or the current coordinate system
)
SetLineFeaturePointListEx
public GM_Error_t32 SetLineFeaturePointListEx(
	uint aFeatureIndex,        //Index of feature in layer
	GM_Point_t[] aPointList,   //New list of points for line
	bool aPosInLayerCoords,    //Are the position in the layer coordinate system or the current coordinate system
	float[] aElevList          //List of per-vertex elevations. Use NULL if no elevation list
)
SetPointFeatureClass
public GM_Error_t32 SetPointFeatureClass(
	uint aFeatureIndex,                    //Index of feature in layer
	PointFeatureClass_t16 aFeatureClass    //New feature class to assign to feature
)
SetPointFeatureDrawStyle
public GM_Error_t32 SetPointFeatureDrawStyle(
	uint aFeatureIndex,            //Index of feature in layer
	GM_PointStyle_t aPointStyle    //New style to use for point, pass null to restore default type-based stuff
)
SetPointFeaturePosition
public GM_Error_t32 SetPointFeaturePosition(
	uint aFeatureIndex,        //Index of feature in layer
	GM_Point_t aPosition,      //New location of point
	bool aPosInLayerCoords     //Is the position in the layer coordinate system or the current coordinate system
)
ShowOptionsDialog
public GM_Error_t32 ShowOptionsDialog()
ToString
public override string ToString()
(5)操作符
操作符 描述
Equality 基于它们的句柄比较两个图层是否相等。
Inequality 基于它们的句柄比较两个图层是否不等。
 Equality
public static bool operator ==(
	GM_Layer_t left,    //The Left Layer
	GM_Layer_t right    //The Right Layer
)
Inequality
public static bool operator !=(
	GM_Layer_t left,    //The Left Layer
	GM_Layer_t right    //The Right Layer
)

你可能感兴趣的:(技术文章,个人开发)