In the example of mapobjects2 \ samples \ vbnet \ geometry, the set operation of space ry is as follows:
Private Function MakeExtentFromXYScale(falseX As Double, falseY As Double, xyScale As Double)
As Rectangle' max integer for positive integer coord spaceDim c_maxGeomInt As Long = 2147483645Dim ext As New Rectangle' Shift origin left and down to match the precisionext.Left = Int(falseX * xyScale) / xyScaleext.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 scaleext.Right = ext.Left + c_maxGeomInt / xyScale ext.Top = ext.Bottom + ext.Right - ext.LeftMakeExtentFromXYScale = extEnd Function
It is used for the calculation (Union, difference…) between spatial shape (point, ellipse, rectangle, line ...), Original Form:
ShapeFirst.Union(ShapeSecond,Rectangle)
The second parameter is obtained by calling the above method. The actual meaning is: The minimum rectangle occupied by the two figures to perform geometric operations.
Calling the above method to obtain the rectangle at different scales results are different. Generally, the appearance of the peripheral contour does not reach the actual effect.
Google cannot find the answer. I have seen an article about this issue on ESRI forum. It is an error in ESRI's own example.
Solution:
The second parameter can be used to directly obtain the extent of the current map: This. _ map. extent;