MapObjects2\Samples\VBNet\Geometry例子里的空间几何图形的集合运算有这样一个方法:
Private Function MakeExtentFromXYScale(falseX As Double, falseY As Double, xyScale As Double)
As Rectangle ' max integer for positive integer coord space Dim c_maxGeomInt As Long = 2147483645 Dim ext As New Rectangle ' Shift origin left and down to match the precision ext.Left = Int(falseX * xyScale) / xyScale ext.Bottom = Int(falseY * xyScale) / xyScale ' Set width and height of the rectangle to be a square which is sized ' fill positive integer space at the given scale ext.Right = ext.Left + c_maxGeomInt / xyScale ext.Top = ext.Bottom + ext.Right - ext.Left MakeExtentFromXYScale = ext End Function