Select to view content in your preferred language

Populate a list by location

624
2
12-13-2010 03:25 PM
RonRioux
Emerging Contributor
Hi,

I am very new to customizing ArcPad but I was thinking that it would be very useful to have a list in a form populate by what's located nearby.  For instance, if I were near a certain address when I open the list to select from it there are only addresses that are within a certain radius; not every address in a neighborhood.  Does anyone know if this would be possible?  If so, what would I start to look at to figure out how to do this?

Ron
Tags (3)
0 Kudos
2 Replies
EricHajek1
Regular Contributor
The scripting functions exposed to ArcPad don't make this very easy, but I guess it would be possible. (Worth it? I don't know)

You're able to access the Extent of the screen, which is a Rectangle object.
You're able to break all features down into thier composite parts. (Polygon / Polyline / Points / Parts / Point objects)
You're able to check if a point is in the Rectangle using the Rectangle object's IsPointIn method.

So, theoretically, you could break every point in every layer down into thier composite parts, run those points against the Extent of the map (perhaps + some buffer amount), and from there, traverse the object's structure back up to the point where you could access its attributes. This is really clunky and brute-force, probably not feasible if youre on a handheld GPS device as opposed to a tablet / laptop.

Another way would be to look at the Extent, create a bunch of random Point objects within that Extent (ie- "the search area") and then loop through them all using the RecordSet::FindNearestXY while recording thier objectIDs to then populate an array that you then use to fill your comboboxes. Having typed out all that other crap above, I'd say that this would probably be the easiest way. This is also pretty brute force and will run slow on a handheld device. (Would it be slower than the field workers having to sort through a combo box with 1000 items in it? maybe not)

The problem is that ArcPad doesn't give you access to the types of spatial queries we're used to in ArcMap, and it doesn't let you select multiple features (in the same layer) at one time. As far as I can tell, there's no easy way to ask it to return all (for example) parcels within 1000ft of your GPS location.

Good luck!
0 Kudos
RonRioux
Emerging Contributor
Thanks for the info Eric!
0 Kudos