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> /// Checks a coordinate sequence for equality with this /// </summary> /// <param name="other">The coordinate sequence to test</param> /// <returns><c>true</c> if the coordinates in the coordinate sequence are equal to those in this buffer.</returns> public bool Equals(CoordinateSequence other) { if (other == null) { return(false); } /* * if (other.Ordinates != DefinedOrdinates) * return false; */ if (other.Count != Count) { return(false); } bool checkZ = HasZ && other.HasZ; bool checkM = HasM && other.HasM; for (int i = 0; i < _coordinates.Count; i++) { var coord = _coordinates[i]; if (coord.X != other.GetX(i) || coord.Y != other.GetY(i)) { return(false); } if (checkZ && !coord.Z.Equals(other.GetZ(i))) { return(false); } if (checkM && !coord.M.Equals(other.GetM(i))) { return(false); } } return(true); }
public override double GetX(int index) => _inner.GetX(Count - index - 1);