Select to view content in your preferred language

SelectXY selecting feature even if X, Y not on feature

933
1
07-20-2011 12:36 AM
EddieViljoen
Deactivated User
In ArcPad 10, I have the following issue (Not tested on other versions of ArcPad):

If I do an OnPointerdown event, and use the Map.X and Map.Y to do a spatial select, the system selects the correct feature (a polygon) every time.  If I click outside of the feature, then it is not selected, as expected.

But, if I create a point, and then later use this point coordinates (by means of ObjShp.X, ObjShp.Y) to do a selectXY on a polygon layer, then a polygon is selected even if the point is not on the polygon (Almost as if the point is being snapped to the polygon).

I have also tried populating an X and Y field when creating the point, and then using these values to do SelectXY, but with the same (incorrect) results.

Any ideas anyone?

Eddie
Tags (3)
0 Kudos
1 Reply
EddieViljoen
Deactivated User
OK, problem found, and work-around implemented.

What you need to know is that SelectXY only works on the features that are currently on the screen.
I figured that out early on, and then implemented a "zoom to full extent" before running the selectXY.

This created a different problem:
SelectXY uses a tolerance of x pixels, so if you zoom out too far, the point will be within this tolerance, even though it is outside of the polygon.

You can set the tolerance to zero, but then it becomes virtually impossible to click on any points (if you need to do that elsewhere), so it is not really a sollution.

What I did, was to zoom to a specific scale programatically (i.e. 1:10 000 in my case), and then centre the map on the X,Y of the point that I am working with. 

Not the cleanest or quickest, but it seems to work OK.
0 Kudos