/// <summary> /// Transforms the collection of Points to ILocations according to the matrix. /// </summary> /// <param name="pc"> /// The collection of Points to be transformed. /// </param> /// <returns> /// The transformed Points as ILocations. /// </returns> public IList <ILocation> Transform(PointCollection pc) { return (pc.Select( p => MilSymFactory.Location( Order.LatLon, (p.X * this.M12) + (p.Y * this.M22) + this.M32, (p.X * this.M11) + (p.Y * this.M21) + this.M31)).ToList()); }
/// <summary> /// Transforms the ILocation according to the matrix. /// </summary> /// <param name="loc"> /// The location to be transformed. /// </param> /// <returns> /// The transformed location. /// </returns> public ILocation Transform(ILocation loc) { var x = (loc.Longitude * this.M11) + (loc.Latitude * this.M21) + this.M31; var y = (loc.Longitude * this.M12) + (loc.Latitude * this.M22) + this.M32; if (MilSymFactory == null) { return(null); } return(MilSymFactory.Location(Order.LatLon, y, x)); }
/// <summary> /// Transforms the list of Points to ILocations according to the matrix. /// </summary> /// <param name="pc"> /// The list of Points to be transformed. /// </param> /// <returns> /// The transformed Points as ILocations. /// </returns> public IList <ILocation> Transform(IList <Point> pc) { if (MilSymFactory == null) { return(null); } return (pc.Select( p => MilSymFactory.Location( Order.LatLon, (p.X * this.M12) + (p.Y * this.M22) + this.M32, (p.X * this.M11) + (p.Y * this.M21) + this.M31)).ToList()); }