創建空間參考
//創建空間參考
ISpatialReference pSpatialReference = GetSpatialReferenc(mTimeTrackPoint);
Dictionary<string,esriFieldType>pFieldStruct = new Dictionary<string,esriFieldType>();
//添加字段
string pStartTime = "StartTime";
string pEndTime = "EndTime";
pFieldStruct.Add(pStartTime, esriFieldType.esriFieldTypeString);
pFieldStruct.Add(pEndTime, esriFieldType.esriFieldTypeString);
/// <summary>
/// 獲取要素類空間參考方法。
/// </summary>
/// <param name="pFeatureLayer">要獲取空間參考的圖層</param>
/// <returns>圖層空間參考</returns>
private static ISpatialReference GetSpatialReferenc(IFeatureLayer pFeatureLayer)
{
IFeatureClass pFeatureClass = pFeatureLayer.FeatureClass;
IGeoDataset pGeoDataset = pFeatureClass as IGeoDataset;
ISpatialReference pSpatialReference = pGeoDataset.SpatialReference;
return pSpatialReference;
}
創建空間參考