示例#1
0
 /// <summary>
 /// Transforms a bounding box from one CRS to another.
 /// </summary>
 /// <param name="boundingBox">Bounding box to transform.</param>
 /// <param name="sourceCrs">The source CRS.</param>
 /// <param name="targetCrs">The target CRS.</param>
 /// <param name="nSupportingPoints">Number of supporting points to use.</param>
 /// <param name="resizeFactor">An additional factor for resizing the resulting bounding box; &lt;0 for adding an offset based on side line deviations, &gt;0 for simply resizing the resulting box.</param>
 /// <returns>The transformed bounding box.</returns>
 /// <remarks>This is extension does not only transform the corner points of a given bounding box but takes into
 /// account that the bounds may be distorted when being transformed to another CRS.</remarks>
 public static MapRectangle ApproximateBoundingBox(this IBoundingBox boundingBox, string sourceCrs, string targetCrs, int nSupportingPoints, double resizeFactor)
 {
     return(boundingBox.TransformBoundingBox(sourceCrs, targetCrs, nSupportingPoints).ApproximateBoundingBox(resizeFactor));
 }
示例#2
0
 /// <summary>
 /// Transforms a bounding box from one CRS to another.
 /// </summary>
 /// <param name="boundingBox">Bounding box to transform.</param>
 /// <param name="transformation">The transformation that transforms points from the source CRS to the target CRS.</param>
 /// <param name="nSupportingPoints">Number of supporting points to use.</param>
 /// <param name="resizeFactor">An additional factor for resizing the resulting bounding box; &lt;0 for adding an offset based on side line deviations, &gt;0 for simply resizing the resulting box.</param>
 /// <returns>The transformed bounding box.</returns>
 /// <remarks>This is extension does not only transform the corner points of a given bounding box but takes into
 /// account that the bounds may be distorted when being transformed to another CRS.</remarks>
 public static MapRectangle ApproximateBoundingBox(this IBoundingBox boundingBox, ICoordinateTransformation transformation, int nSupportingPoints, double resizeFactor)
 {
     return(boundingBox.TransformBoundingBox(transformation, nSupportingPoints).ApproximateBoundingBox(resizeFactor));
 }