Beispiel #1
0
        /// <summary>
        /// Transforms a <see cref="ILineString"/> to an array of <see cref="PointF"/>s.
        /// </summary>
        /// <param name="self">The linestring</param>
        /// <param name="map">The mapviewport defining transformation parameters</param>
        /// <returns>The array of <see cref="PointF"/>s</returns>
        public static PointF[] TransformToImage(this ILineString self, MapViewport map)
        {
            if (map.MapTransformRotation.Equals(0f))
            {
                return(Transform.WorldToMap(self.Coordinates, map.Left, map.Top, map.PixelWidth, map.PixelHeight));
            }

            return(Transform.WorldToMap(self.Coordinates, map.WorldToMapTransform(false)));
        }