[AccessD] code to find the population within a radius of a zip code

MartyConnelly martyconnelly at shaw.ca
Fri May 4 15:35:38 CDT 2007


I would like to see code too. There are many possible errors.

How accurate do you want to be.  Third order surveying accuarcy?
Generally
lat/long with 3 decimal places accuracy gives you 100 metre error
lat/long with 4 decimal places gives 10 metre error

Other errors.
 
The shape of the Earth more closely resembles a flattened spheroid
with extreme values for the radius of curvature, or arcradius, of 
6335.437 km
at the equator (vertically) and 6399.592 km at the poles
 and having an average great-circle radius of 6372.795 km (3438.461 
nautical miles).

Using a sphere with a radius of 6372.795 km thus results in
a probable error of up to about 0.5%.

Examples:

This is a circle on the surface of the planet. At larger radii,
the effects of the Mercator projection become clearly visible.
Try a 2000 mile radius and move mouse to see if point within a circle
or is it an egg?

http://maps.forum.nu/gm_sensitive_circle2.html

This circle is actually tangent to the surface of the Earth,
but for small radii this is of little significance.

http://maps.forum.nu/gm_clickable_circle.html



Borge Hansen wrote:

>>John Colby wrote:
>>I converted the code to find the population within a radius of a zip code.
>>    
>>
>
>Hi John,
>What does your VBA code look like?
>
>I am using a code that will find a subset of records based on their geocode within a near enough square,
>
>...and querying the recordset like this
>
>....find me all record instances where Lat of record is between "northernmost Lat" and "southernmost Lat" and Long of record is
>between "most western Long" and "most eastern Long"
>
>Interested to see your code based on a circle construct.....
>
>Regards
>borge
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada




More information about the AccessD mailing list