This is a points in a polygon project whereby I need to assign places to a sales zone within a U.S. state. I'll provide you the following 2 files for testing:
1. A "Places" csv for an individual U.S. state having a place, type place, latitude, longitude, etc. for the places in that state.
2. A "Saleszones" csv with cornerpoints creating geographic sales zones. For example, cornerpoints number from 3 to 10 resulting in Arizona having 19 zones.
Objective:
Create a simple tool that assigns places in a U.S. state with a geographic zone for a given state (points in a polygon).
First, on a state-by-state basis, uses the Saleszones csv file to create zones for a state.
Second, reads the latitude and longitude from the Placesfile csv and assigns all places into a geographic sales zone.
Third, outputs a csv file showing zone, place, typeplace, latitude, longitude.
Considerations:
1. Some sales zone might have angles under 90 degrees.
2. Places for a state could number in the tens of thousands.
In Conclusion:
This tool will enable me to load a places and saleszones file for a state. It will assign places to a sales zone and list all the places with it's sales zone in a csv. I'll use this for all 50 states.
How this works is up to you. It could be an executable, bat, text file, whatever is easiest.