Method For Checking Spatial Data In A Table

346
2
09-28-2012 12:32 PM
GeneDixon
New Contributor II
All,
I am having difficulty figuring out this problem and I am hoping for some guidance from the forum.

I have two feature layers; a point layer of donut shops and a US Counties polygon layer. I have to visually check all the locations of the donut shops on an imagery layer to make sure that they are in the correct location. What I would like to do is iterate through the list of donut shops and check to see if each point feature is located in the correct county and state. As the process checks each donut shop, put a yes or no in the county and state fields. This is of course to weed out the ones that are in the wrong county or state. I can those send back to the data providers for a new XY coordinate and I do not have to manually check them.

I was thinking that I could do something like this in model builder and thought that the first place to start looking was at the Iterator toolset. Theoretically, I know how this should work but I do not know how to do it.

Does a model all ready exist to do this that I can modify? Or can someone point me in the right direction regarding as to how I might accomplish this task?

Thanks for any consideration of my problem.

The point layer has the following columns:
Shop Name
Latitude
Longitude
County Name
State Name
CountyYesNo
StateYesNo

The US Counties layer has the columns:
County Name
State Name
0 Kudos
2 Replies
JonathanQuinn
Esri Frequent Contributor
Hm, off the top of my head, what you may be able to do is run an Intersect between the points and US counties layer to append the US Counties information to the points layer.  Then, use the Select By Attributes to select for records where the county name from the points does not equal the county name from the appended US Counties information, calculate a No for these records, switch the selection, and calculate a Yes for the reverse of the selection.  Perform the same analysis for the state name.
0 Kudos
LucasDanzinger
Esri Frequent Contributor
Another idea would be a spatial join, where the polygon is the join feature and the point is the target feature. That way, you can get the County and State info from the polygon layer into the point layer. Then, you just need to compare the two. I would create a two new fields, one called CountyCheck and another called StateCheck. These would be Text fields. Then, just do an if/else statement with the Field Calculator to see if field A == Field B. For example:

Dim equal

If [FieldA] == [Fieldb] Then
  equal = "yes"
else
  equal = "no"
end if
0 Kudos