public static void Rotate(IGeometry geometry, double degrees, Point center) { foreach (var vertex in geometry.AllVertices()) { Rotate(vertex, degrees, center); } }
public static void Scale(IGeometry geometry, double scale, Point center) { foreach (var vertex in geometry.AllVertices()) { Scale(vertex, scale, center); } }
public static void Transform(IGeometry geometry, ICoordinateTransformation coordinateTransformation) { var vertices = geometry.AllVertices(); foreach (var vertex in vertices) { double[] point = coordinateTransformation.MathTransform.Transform(new[] { vertex.X, vertex.Y }); vertex.X = point[0]; vertex.Y = point[1]; } }
public IGeometry Transform(string fromCRS, string toCRS, IGeometry geometry) { Transform(geometry.AllVertices(), _toLatLon[fromCRS]); Transform(geometry.AllVertices(), _fromLatLon[toCRS]); return(geometry); // this method should not have a return value }
public IGeometry Transform(string fromCRS, string toCRS, IGeometry geometry) { Transform(geometry.AllVertices(), _toLatLon[fromCRS]); Transform(geometry.AllVertices(), _fromLatLon[toCRS]); return geometry; // this method should not have a return value }