本文整理汇总了C#中ISpatialReference.GetZDomain方法的典型用法代码示例。如果您正苦于以下问题:C# ISpatialReference.GetZDomain方法的具体用法?C# ISpatialReference.GetZDomain怎么用?C# ISpatialReference.GetZDomain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISpatialReference
的用法示例。
在下文中一共展示了ISpatialReference.GetZDomain方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FormatSpatialReference
public static string FormatSpatialReference(ISpatialReference sr)
{
try
{
if (sr == null)
{
return "";
}
StringBuilder builder = new StringBuilder();
if (sr is UnknownCoordinateSystemClass)
{
builder.Append("UnknownCoordinateSystem");
}
else
{
if (sr.Name == "Unknown")
{
builder.Append("UnknownCoordinateSystem");
}
else
{
IGeographicCoordinateSystem system2;
if (sr is IProjectedCoordinateSystem)
{
Exception exception;
IProjectedCoordinateSystem system = sr as IProjectedCoordinateSystem;
builder.Append("投影坐标系:\n");
builder.Append(" Name:").Append(system.Name).Append("\n");
builder.Append(" Alias:").Append(system.Alias).Append("\n");
builder.Append(" Abbreviation:").Append(system.Abbreviation).Append("\n");
builder.Append(" Remarks:").Append(system.Remarks).Append("\n");
builder.Append("投影:").Append(system.Projection.Name).Append("\n");
builder.Append("投影参数:\n");
builder.Append(" False_Easting:").Append(system.FalseEasting).Append("\n");
builder.Append(" False_Northing:").Append(system.FalseNorthing).Append("\n");
builder.Append(" Central_Meridian:").Append(system.get_CentralMeridian(true)).Append("\n");
try
{
builder.Append(" Scale_Factor:").Append(system.ScaleFactor).Append("\n");
}
catch { }
builder.Append(" Latitude_Of_Origin:0\n");
builder.Append("Linear Unit:").Append(system.CoordinateUnit.Name).Append("(").Append(system.CoordinateUnit.MetersPerUnit).Append(")\n");
builder.Append("Geographic Coordinate System:\n");
system2 = system.GeographicCoordinateSystem;
builder.Append(" Name:").Append(system2.Name).Append("\n");
builder.Append(" Alias:").Append(system2.Alias).Append("\n");
builder.Append(" Abbreviation:").Append(system2.Abbreviation).Append("\n");
builder.Append(" Remarks:").Append(system2.Remarks).Append("\n");
builder.Append(" Angular Unit:").Append(system2.CoordinateUnit.Name).Append("(").Append(system2.CoordinateUnit.RadiansPerUnit).Append(")\n");
builder.Append(" Prime Meridian:").Append(system2.PrimeMeridian.Name).Append("(").Append(system2.PrimeMeridian.Longitude).Append(")\n");
builder.Append(" Datum:").Append(system2.Datum.Name).Append("\n");
builder.Append(" Spheroid:").Append(system2.Datum.Spheroid.Name).Append("\n");
builder.Append(" Semimajor Axis:").Append(system2.Datum.Spheroid.SemiMajorAxis).Append("\n");
builder.Append(" Semiminor Axis:").Append(system2.Datum.Spheroid.SemiMinorAxis).Append("\n");
builder.Append(" Inverse Flattening:").Append((double)(1.0 / system2.Datum.Spheroid.Flattening)).Append("\n");
builder.Append("X/Y Domain:\n");
try
{
double num = 0.0;
double num2 = 0.0;
double num3 = 0.0;
double num4 = 0.0;
double num5 = 0.0;
sr.GetDomain(out num, out num3, out num2, out num4);
sr.GetFalseOriginAndUnits(out num, out num2, out num5);
builder.Append(" Min X:").Append(num).Append("\n");
builder.Append(" Min Y:").Append(num2).Append("\n");
builder.Append(" Max X:").Append(num3).Append("\n");
builder.Append(" Max Y:").Append(num4).Append("\n");
builder.Append(" XYScale:").Append(num5).Append("\n");
builder.Append("\n");
}
catch (Exception exception1)
{
exception = exception1;
}
builder.Append("Z Domain:\n");
try
{
double num6;
double num7;
double num8 = 0.0;
sr.GetZDomain(out num6, out num7);
sr.GetZFalseOriginAndUnits(out num6, out num8);
builder.Append(" Min Z:").Append(num6).Append("\n");
builder.Append(" Max Z:").Append(num7).Append("\n");
builder.Append(" ZScale:").Append(num8).Append("\n");
builder.Append("\n");
}
catch (Exception exception2)
{
exception = exception2;
}
try
{
double num9;
double num10;
builder.Append("M Domain:\n");
double num11 = 0.0;
//.........这里部分代码省略.........