jlfreder

Python: point in polygon, then looping

Discussion created by jlfreder on Apr 10, 2010
Latest reply on Oct 6, 2010 by frankv3
I was hoping someone could help get me started.  I have two shapefiles: an address point file and a parcel polygon file.  Each parcel as a unique PIN #; similarly, if an address point is within a parcel, it will have a matching PIN #.  Sometimes these PIN #s go unmatched and this is where i want to create a script.

I want to loop through the parcel table, determine if the parcel contains any address points, and if so compare the PIN #s to make sure they match.  If they don't match, then use VBA to print the address of the point out in the window.

I'm still sort of a beginner with scripting with python, but can do basic scripts and VBA stuff.   How would I use it to determine if each parcel contains any address points??  I was thinking spatial join but am still unsure....thanks in advance.

Outcomes