/// <summary> /// This method populates the given sink with the data from this geography instance /// </summary> /// <param name="sink">Sink to be populated</param> public override void Populate(IGeographySink sink) { if (this.OuterRing == null || this.OuterRing.Points == null || this.OuterRing.Points.Count == 0) { return; } sink.BeginGeography(OpenGisGeographyType.Polygon); // Populates the outer boundary sink.BeginFigure( this.OuterRing.Points[0].Latitude, this.OuterRing.Points[0].Longitude, this.OuterRing.Points[0].Altitude, this.OuterRing.Points[0].Measure); for (int i = 1; i < this.OuterRing.Points.Count; i++) { sink.AddLine( this.OuterRing.Points[i].Latitude, this.OuterRing.Points[i].Longitude, this.OuterRing.Points[i].Altitude, this.OuterRing.Points[i].Measure); } sink.EndFigure(); if (this.InnerRing != null && this.InnerRing.Count > 0) { // Populates the inner boundaries for (int j = 0; j < this.InnerRing.Count; j++) { if (this.InnerRing[j].Points == null || this.InnerRing[j].Points.Count == 0) { continue; } sink.BeginFigure( this.InnerRing[j].Points[0].Latitude, this.InnerRing[j].Points[0].Longitude, this.InnerRing[j].Points[0].Altitude, this.InnerRing[j].Points[0].Measure); for (int i = 1; i < this.InnerRing[j].Points.Count; i++) { sink.AddLine( this.InnerRing[j].Points[i].Latitude, this.InnerRing[j].Points[i].Longitude, this.InnerRing[j].Points[i].Altitude, this.InnerRing[j].Points[i].Measure); } sink.EndFigure(); } } sink.EndGeography(); }
public void BeginFigure(double x, double y, double?z, double?m) { _sink.BeginGeography(OpenGisGeographyType.Point); _sink.BeginFigure(y, x, z, m); _sink.EndFigure(); _sink.EndGeography(); }
public void EndFigure() { if (m_TargetSink != null) { m_TargetSink.EndFigure(); } }
public void EndFigure() { if (m_depth == 0) { m_sink.EndFigure(); } }
/// <summary> /// This method populates the given sink with the data about this geography instance /// </summary> /// <param name="sink">Sink to be populated</param> public override void Populate(IGeographySink sink) { sink.BeginGeography(OpenGisGeographyType.Point); sink.BeginFigure(Latitude, Longitude, Altitude, Measure); sink.EndFigure(); sink.EndGeography(); }
private void PopulateFigure(IGeographySink sink) { m_figure[0].BeginFigure(sink); for (int i = 1; i < m_figure.Count; i++) { m_figure[i].AddLine(sink); } sink.EndFigure(); }
public void EndFigure() { if (m_insidePolygon) { if (!IsThinRing()) { PopulateFigure(m_sink, false); } } else { m_sink.EndFigure(); } }
public void EndFigure() { if (m_insideLineString) { if (!IsShortLineString()) { PopulateFigure(m_sink); } } else { m_sink.EndFigure(); } }
/// <summary> /// This method populates the given sink with the data from this geography instance /// </summary> /// <param name="sink">Sink to be populated</param> public override void Populate(IGeographySink sink) { if (Points == null || Points.Count == 0) { return; } sink.BeginGeography(m_OpenGisGeographyType); sink.BeginFigure(Points[0].Latitude, Points[0].Longitude, Points[0].Altitude, Points[0].Measure); for (int i = 1; i < Points.Count; i++) { sink.AddLine(Points[i].Latitude, Points[i].Longitude, Points[i].Altitude, Points[i].Measure); } sink.EndFigure(); sink.EndGeography(); }
private void PopulateFigure(IGeographySink sink, bool reverse) { if (reverse) { m_figure[m_figure.Count - 1].BeginFigure(sink); for (int i = m_figure.Count - 2; i >= 0; i--) { m_figure[i].AddLine(sink); } } else { m_figure[0].BeginFigure(sink); for (int i = 1; i < m_figure.Count; i++) { m_figure[i].AddLine(sink); } } sink.EndFigure(); }
public void EndFigure() { _target.EndFigure(); }
public void EndFigure() { m_sink.EndFigure(); }