/// <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 BeginFigure(double latitude, double longitude, double?z, double?m) { if (m_TargetSink != null) { m_TargetSink.BeginFigure(latitude, longitude, z, m); } }
public void BeginFigure(double x, double y, double?z, double?m) { double latitude, longitude; _projection.UnprojectPoint(x, y, out latitude, out longitude); _sink.BeginFigure(latitude, longitude, z, m); }
public void BeginFigure(double latitude, double longitude, double?z, double?m) { if (m_depth == 0) { m_sink.BeginFigure(latitude, longitude, z, m); } }
/// <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(); }
public void BeginFigure(double latitude, double longitude, double?z, double?m) { while (m_types.Count > 0) { m_sink.BeginGeography(m_types.Dequeue()); } m_sink.BeginFigure(latitude, longitude, z, m); }
public void BeginFigure(double latitude, double longitude, Nullable <double> z, Nullable <double> m) { double[] fromPoint = { longitude, latitude }; double[] toPoint = _trans.MathTransform.Transform(fromPoint); double tolong = toPoint[0]; double tolat = toPoint[1]; _sink.BeginFigure(tolat, tolong, z, m); }
public void BeginFigure(double x, double y, double?z, double?m) { double[] fromPoint = { x, y }; double[] toPoint = _trans.MathTransform.Transform(fromPoint); double longitude = toPoint[0]; double latitude = toPoint[1]; _sink.BeginFigure(latitude, longitude, z, m); }
public void BeginFigure(double latitude, double longitude, double?z, double?m) { if (m_insidePolygon) { m_figure.Clear(); m_figure.Add(new Vertex(latitude, longitude, z, m)); } else { m_sink.BeginFigure(latitude, longitude, z, m); } }
/// <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(); }
// Each BeginFigure call rounds the start point to the required precision. public void BeginFigure(double x, double y, double?z, double?m) { _target.BeginFigure(Math.Round(x, _precision), Math.Round(y, _precision), z, m); }
public void BeginFigure(double x, double y, double?z, double?m) { _target.BeginFigure(y, x, z, m); }
public void BeginFigure(IGeographySink sink) { sink.BeginFigure(x, y, z, m); }
public void BeginFigure(double latitude, double longitude, double?z, double?m) { // Starting the figure, remembering the vector that corresponds to the first point. _startPoint = Util.SphericalDegToCartesian(latitude, longitude); _sink.BeginFigure(latitude, longitude, z, m); }