public void Filter(CoordinateSequence seq, int i) { var(x, y, z) = _mathTransform.Transform(seq.GetX(i), seq.GetY(i), seq.GetZ(i)); seq.SetX(i, x); seq.SetY(i, y); seq.SetZ(i, z); }
public void Filter(CoordinateSequence seq, int i) { var x = seq.GetX(i); var y = seq.GetY(i); var z = seq.GetZ(i); _transform.Transform(ref x, ref y, ref z); seq.SetX(i, x); seq.SetY(i, y); seq.SetZ(i, z); }
///<summary> /// Copies a coordinate of a <see cref="CoordinateSequence"/> to another <see cref="CoordinateSequence"/>. /// The sequences may contain different <see cref="Ordinates"/>; in this case only the common ordinates are copied. ///</summary> /// <param name="src">The sequence to copy coordinate from</param> /// <param name="srcPos">The index of the coordinate to copy</param> /// <param name="dest">The sequence to which the coordinate should be copied to</param> /// <param name="destPos">The index of the coordinate in <see paramref="dest"/></param> protected static void CopyCoord(CoordinateSequence src, int srcPos, CoordinateSequence dest, int destPos) { dest.SetX(destPos, src.GetX(srcPos)); dest.SetY(destPos, src.GetY(srcPos)); if (src.HasZ && dest.HasZ) { dest.SetZ(destPos, src.GetZ(srcPos)); } if (src.HasM && dest.HasM) { dest.SetM(destPos, src.GetM(srcPos)); } }
public void Filter(CoordinateSequence seq, int i) { seq.SetZ(i, _XYToElevation(seq.GetX(i), seq.GetY(i))); }