Problems with the built-in examples of mapobjects2

Source: Internet
Author: User

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;
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.