I have a database of many tens of thousands of events that occurred at specific geographic locations in the United States. Data includes x, y coodinates for each event encoded using the NAD83 reference system. I want to write or use an algorithm to reliably get the US zip code associated with each x, y coordinate of NAD83.
I do not yet have postal code definitions using the NAD83 reference system. And I did not do such programming before. But it just seems that it would be intuitively simple to find out if the given x, y coordinate is in the geometrical form of the American postal code determined using the same NAD83 reference frame.
Can someone help me with the following:
1.) Where can I get reliable US Zip Code definitions in the format of the NAD83 reference system?
2.) Where can I find sample code for an algorithm to search for the zip code given by x, y coordinate?
Any links you can send to study articles / tutorials, sample code, and NAD83 zip code definitions will be really helpful. I do Google searches, but I decided that the people on this site could give me more expert guidance.
I have Java code every day. But if the code you provide is not written in java, I could take the code written in another language and adapt it to java for my purposes. I do not have the database software installed on my computer because I just use csv or text files as tabs in my java applications. If you have a database that you propose to use, I need links to instructions on how to get the data in a format that I can import into a programming language, such as java.
Finally, the street addresses in my dataset do not contain postal codes, and street addresses are randomly written, so it would be very difficult to try to clear the address data in order to try to get the postal codes from addresses. I can isolate the data in several neighboring cities, possibly in a few hundred postal codes, but I think the NAD83 x, y coordinates are my best shot at getting the zip code where every event in my dataset happened. I want to associate the resulting zip code with the analysis of the zip code with other data that I receive about each zip code from sources such as the US Census, etc.
Thanks in advance to everyone who wants to help.