/* * <vertical-datum-info unit="ft"> * <native-datum>NGVD-29</native-datum> * <elevation>615.2</elevation> * <offset estimate="false"> * <to-datum>NGVD-29</to-datum> * * <value>0.0</value></offset> * <offset estimate="true"> * <to-datum>NAVD-88</to-datum><value>0.5</value> * </offset></vertical-datum-info> */ public string ToXml(bool humanFriendly = false) { XmlDocument doc = new XmlDocument(); XmlElement vertical_datum = doc.CreateElement("vertical-datum-info"); var node = doc.AppendChild(vertical_datum); var a = doc.CreateAttribute("unit"); a.Value = Units; vertical_datum.Attributes.Append(a); var elev = doc.CreateElement("elevation"); elev.InnerText = Elevation.ToString(); vertical_datum.AppendChild(elev); var nativeDatum = doc.CreateElement("native-datum"); nativeDatum.InnerText = NativeDatum; vertical_datum.AppendChild(nativeDatum); AppendOffset(doc, "NGVD-29", NGVD29OffsetIsEstimate, NGVD29Offset); AppendOffset(doc, "NAVD-88", NAVD88OffsetIsEstimate, NAVD88Offset); if (humanFriendly) { XDocument xd = XDocument.Parse(ToXml()); return(xd.ToString()); } return(doc.OuterXml); }
protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options) { base.setJSON(obj, host, options); if (!double.IsNaN(mElevation)) { obj["Elevation"] = Elevation.ToString(); } }
protected override void setJSON(JObject obj, BaseClassIfc host, HashSet <int> processed) { base.setJSON(obj, host, processed); if (!double.IsNaN(mElevation)) { obj["Elevation"] = Elevation.ToString(); } }
void ElevationChanged(object sender, DistanceEventArgs e) { lock (syncRoot) { Elevation = e.Distance; } Debug.WriteLine("Altitude changed: " + Elevation.ToString()); NotifyOfGpsDataUpdate(); }
public IFeature ToFeature() { Feature f = new Feature(); f.GeoData = GetPosition().ToString(); f["Elevation"] = Elevation.ToString(); f["Time"] = Time.ToString(); return(f); }
public void sendMessageToOSCHandler() { string[] data = new string[2]; data[0] = masterAzimuth; data[1] = Azimuth.ToString(); output.SendMessage("SendOSCMessageToClient", data); data[0] = masterElevation; data[1] = Elevation.ToString(); output.SendMessage("SendOSCMessageToClient", data); }
public IFeature ToFeature() { return(new Feature { GeoData = new List <Vector> { GetPosition() }, ["Elevation"] = Elevation.ToString(), ["Time"] = Time.ToString() }); }
/// <summary> /// Returns a <see cref="System.String"/> that represents this instance. /// </summary> /// <param name="format">The format to use.-or- A null reference (Nothing in Visual Basic) to use the default format defined for the type of the <see cref="T:System.IFormattable"/> implementation.</param> /// <param name="formatProvider">The provider to use to format the value.-or- A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.</param> /// <returns>A <see cref="System.String"/> that represents this instance.</returns> public string ToString(string format, IFormatProvider formatProvider) { CultureInfo culture = (CultureInfo)formatProvider ?? CultureInfo.CurrentCulture; if (string.IsNullOrEmpty(format)) { format = "G"; } return(Name + " (" + _pseudorandomNumber.ToString(format, formatProvider) + "): " + _azimuth.ToString(format, formatProvider) + culture.TextInfo.ListSeparator + " " + _elevation.ToString(format, formatProvider) + culture.TextInfo.ListSeparator + " " + _signalToNoiseRatio.ToString(format, formatProvider)); }
public string ToString(string format, IFormatProvider formatProvider) { CultureInfo culture = (CultureInfo)formatProvider; if (culture == null) { culture = CultureInfo.CurrentCulture; } if (format == null || format.Length == 0) { format = "G"; } return(Name + " (" + _PseudorandomNumber.ToString(format, formatProvider) + "): " + _Azimuth.ToString(format, formatProvider) + culture.TextInfo.ListSeparator + " " + _Elevation.ToString(format, formatProvider) + culture.TextInfo.ListSeparator + " " + _SignalToNoiseRatio.ToString(format, formatProvider)); }
private string GetInfo() { StringBuilder sb = new StringBuilder(); sb.AppendLine(BuildingTypeName); if (Height != 0) { sb.Append("H=").AppendLine(Height.ToString()); } if (Elevation != 0) { sb.Append("Уровень=").AppendLine(Elevation.ToString()); } sb.AppendLine(IsProjectedBuilding ? "Проектируемое" : "Окр.застройка"); if (!string.IsNullOrEmpty(FriendlyTypeName)) { sb.AppendLine(FriendlyTypeName); } return(sb.ToString()); }
public override void WriteGroupCodes() { int flags; WriteGroupCodeValue(66, "1"); WriteGroupCodeValue(10, "0"); WriteGroupCodeValue(20, "0"); WriteGroupCodeValue(30, Elevation.ToString().Trim()); WriteGroupCodeValue(40, DefaultStartingWidth.ToString().Trim()); WriteGroupCodeValue(41, DefaultEndingWidth.ToString().Trim()); WriteGroupCodeValue(71, PolygonMeshMVertexCount.ToString().Trim()); WriteGroupCodeValue(72, PolygonMeshNVertexCount.ToString().Trim()); WriteGroupCodeValue(73, SmoothSurfaceMDensity.ToString().Trim()); WriteGroupCodeValue(74, SmoothSurfaceNDensity.ToString().Trim()); flags = 0; if (IsClosedPolyline) { flags += 1; } if (HasCurveFitVertices) { flags += 2; } if (HasSplineFitVertices) { flags += 4; } if (Is3DPolyline) { flags += 8; } if (Is3DMesh) { flags += 16; } if (MeshClosedInTheNDirection) { flags += 32; } if (IsPolyfaceMesh) { flags += 64; } if (ContinuousLineType) { flags += 128; } WriteGroupCodeValue(70, flags.ToString().Trim()); if (NoSmoothSurfaceFitted) { WriteGroupCodeValue(75, "0"); } else if (QuadraticBSplineSurface) { WriteGroupCodeValue(75, "5"); } else if (CubicBSplineSurface) { WriteGroupCodeValue(75, "6"); } else if (BezierSurface) { WriteGroupCodeValue(75, "8"); } if (VertexList != null) { foreach (CEntityVertex vertex in VertexList) { vertex.WriteGroupCodes(); } } }
public static async Task <ElevationResponse> GetAsync(this Elevation request) => await request.GetAsync <ElevationResponse>(request.ToString());