|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Xml.Linq;
|
|
|
|
|
|
|
|
|
|
namespace Kingo.Plugin.YJJK.ModelEntity
|
|
|
|
|
{
|
|
|
|
|
public class LandTypeDicHelper
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取二级地类地类编码和地类名称对应字典
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static Dictionary<string, string> GetLevel2LandTypeDic()
|
|
|
|
|
{
|
|
|
|
|
Dictionary<string, string> dic = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
|
|
string ConfigPath = System.IO.Path.Combine(KGIS.Framework.Utils.SysAppPath.GetConfigPath(), "CommonlyDic.xml");
|
|
|
|
|
XDocument SystemConfigDocument = XDocument.Load(ConfigPath);
|
|
|
|
|
var elements = SystemConfigDocument.Element("Root").Elements();
|
|
|
|
|
foreach (XElement item in elements)
|
|
|
|
|
{
|
|
|
|
|
dic.Add(item.Attribute("DLBM").Value, item.Element("DLMC").Value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return dic;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取一级地类地类编码和地类名称对应字典
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static Dictionary<string, string> GetLevel1LandTypeDic()
|
|
|
|
|
{
|
|
|
|
|
Dictionary<string, string> dic = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
|
|
string ConfigPath = System.IO.Path.Combine(KGIS.Framework.Utils.SysAppPath.GetConfigPath(), "CommonlyDic.xml");
|
|
|
|
|
XDocument SystemConfigDocument = XDocument.Load(ConfigPath);
|
|
|
|
|
var elements = SystemConfigDocument.Element("Root").Elements();
|
|
|
|
|
foreach (XElement item in elements)
|
|
|
|
|
{
|
|
|
|
|
if (dic.ContainsKey(item.Element("YJDLBM").Value)) continue;
|
|
|
|
|
dic.Add(item.Element("YJDLBM").Value, item.Element("YJDLMC").Value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return dic;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取二级地类地类编码和一级地类地类编码对应字典
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static Dictionary<string, string> GetLevel2ToLevel1LandTypeDic()
|
|
|
|
|
{
|
|
|
|
|
Dictionary<string, string> dic = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
|
|
string ConfigPath = System.IO.Path.Combine(KGIS.Framework.Utils.SysAppPath.GetConfigPath(), "CommonlyDic.xml");
|
|
|
|
|
XDocument SystemConfigDocument = XDocument.Load(ConfigPath);
|
|
|
|
|
var elements = SystemConfigDocument.Element("Root").Elements();
|
|
|
|
|
foreach (XElement item in elements)
|
|
|
|
|
{
|
|
|
|
|
dic.Add(item.Attribute("DLBM").Value, item.Element("YJDLBM").Value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return dic;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取二级地类地类编码和三大类对应字典
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static Dictionary<string, string> GetLevel0LandTypeDic()
|
|
|
|
|
{
|
|
|
|
|
Dictionary<string, string> dic = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
|
|
string ConfigPath = System.IO.Path.Combine(KGIS.Framework.Utils.SysAppPath.GetConfigPath(), "CommonlyDic.xml");
|
|
|
|
|
XDocument SystemConfigDocument = XDocument.Load(ConfigPath);
|
|
|
|
|
var elements = SystemConfigDocument.Element("Root").Elements();
|
|
|
|
|
foreach (XElement item in elements)
|
|
|
|
|
{
|
|
|
|
|
dic.Add(item.Attribute("DLBM").Value, item.Element("SDL").Value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return dic;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|