PDA

View Full Version : Zip Code Fractions



MapUser
10-05-2006, 07:33 AM
Hi there,

I am wondering if there is a way to obtain ZIP code fractions that are captured by a radius. I know that you can export all the ZIP codes touched by a radius. But I need the fraction of the ZIP that is actually inside the radius. Essentially, given a radius, I am looking for an output like:



ZIP Fraction in Radius
------------- -------------
12345 78%
23456 92%
...




Thanks a lot.


Pete

Wilfried
10-05-2006, 03:15 PM
Hi Pete,

For everything there is a way :)

Search point by point in the radius for a street. Then filter out duplicate streetnames. Then you have a location object for every street in your radius.

Et voila each object has his zip code and you have to do some simple calculation to get the percentage.

MapUser
10-17-2006, 09:32 AM
Hi Wilfried,

Thank you very much for your reply. Please excuse my unfamiliar with MapPoint programming API, but could you please advice which function to use to find all the points within a radius and/or zip code? Thank you very much.

Pete

Wilfried
10-19-2006, 11:25 AM
Hi Pete,

For each point you wants to check you calculate latitude and longitude. To see if you have an object you can use ObjectsFromPoint();

I have an article that more or less describe what you do. Do a search on 'snap to road' on this site. It start on a position and then it make a vector checking each point with 5 meter interval, increase radius 5 meter until the radius of the circle is reached.