- Round circle by square if zips given by points;
- Exact 3D geometry calculate if zips given by points;
- Exact GIS calculate if zips given by polygons.
Approximation by square
We approximate circle by square on surface, where:
- latitude +- radius/EARTH_RADUIS
- longitude +- radius/(EARTH_RADUIS*cos(latitude))
cos here is because longitudes distances differs depending on latitudes (say, in polar it is 0).
The databases for 1999 is accessible open source, but up to date database costs money. Free database:
http://svn.baconbear.com/rails_plugins/acts_as_locateable/trunk/data/zip_code_data.csv
Open source database is about 42 000 records. Up to date is about 72 000. See, for instance:
- http://www.zip-codes.com/
- http://www.zip-code-database.org/
- http://www.google.com/search?q=zip+codes+database
Exact 3D calculations
3D coordinates:
- x= EARTH_RADIUS*sin(latitude)*cos(longitude)
- y= EARTH_RADIUS*sin(latitude)*sin(longitude)
- z= EARTH_RADIUS*cos(latitude)
Search points must be within sphere:
x*x + y*y + z*z <= radius*radius
It is non-efficient table full-scan implementation.
See http://en.wikipedia.org/wiki/Spherical_coordinate_system
Exact zip polygon databases
Here you have to install open-source PostGIS (http://postgis.refractions.net/) system on your PostgreSQL and buy zip codes polygon database.
After installing PostGIS you can query zip codes within given radius the next way (http://postgis.refractions.net/pipermail/postgis-users/2007-February/014760.html):
SELECT z.zipcode FROM zipcode z, zipcode z2 WHERE z2.zipcode = '02109' AND expand(z2.the_geom, "whatever radius you want goes here but your spatial ref needs to be in that metric or you need to convert the radius") && z.the_geom AND distance(z.the_geom, z2.the_geom) <= "radius"
Zip codes polygon databases:
- http://maps.huge.info/blog/2007/04/zip_code_polygon_databases.html
- http://www.google.com/search?q=zip+codes+poligon+database
28 comments:
Дак оно же есть все уже реализованное на несколько раз внутри плагинов YM4R/GM и GeoKit, если я не ошибаюсь
Да, но насколько я понимаю, используется google API, соответсвтвенно, есть ряд ограничений :)
You write very well.
predictable noises compendium prediction hmso admirable wheeler alfragide medicolabs paarmann psivida
lolikneri havaqatsu
салют!
постинг dle %PP 8376
nizoral tinea versicolor :-[[[ 5841 zantac medication -) 1263 buy protonix :-( 4537
Привет! партнерские программы
-)) 4692
Buy Diflucan Online =DD
insomnia lexapro -)
Секс Запознанства :) 95172
Goldbaby Fatso Synths Vol.1 Multiformat (1 cd) 17459 -)
Alchemy Mindworks Graphic Workshop Professional 3.0a41 14796 =DD
belgia randki -) 84239
gumtree randki !) 98512
виагра инструкция !)
виагра продажа 297481
821 виагра 100
действие виагры 6953
дженерик сиалис софт !)
сиалис побочные 159246
381 действие сиалиса
купить сиалис с доставкой 6213
randki na czacie %)
dziewczyny na randki 793658
619 randki w
randki za darmo 7634
однотрахники сколько стоит регистрация :(
сайт однотрахники 319854
483 однотрахники ру
порно однотрахники 6842
Вот новейшие киноленты что я нашла в сети из рабочих
Your style is really unique compared to other folks I have read stuff from.
Many thanks for posting when you've got the opportunity, Guess I'll just
book mark this site.
Also see my page - best place to find jobs online
I simply couldn't leave your website before suggesting that I actually loved the usual info a person provide for your visitors? Is gonna be back often in order to inspect new posts
Here is my site real online work from home jobs
Hey just wanted to give you a quick heads up.
The words in your content seem to be running off the screen in Safari.
I'm not sure if this is a format issue or something to do with browser compatibility but I thought I'd
post to let you know. The style and design look great though!
Hope you get the issue fixed soon. Cheers
Also visit my webpage :: work from home jobs online
Fantastic site you have here but I was curious if you
knew of any community forums that cover the same topics discussed here?
I'd really love to be a part of group where I can get opinions from other knowledgeable people that share the same interest. If you have any suggestions, please let me know. Thanks a lot!
Here is my web-site : working online from home jobs
Thank you for some other great post. Where else could anybody get that type of
info in such a perfect manner of writing? I've a presentation next week, and I am at the look for such info.
My page - real money online slots
Great blog right here! Also your site lots up fast!
What web host are you the use of? Can I am
getting your affiliate link on your host? I want my site loaded up as fast as yours lol
Also visit my homepage :: forex factory calendar
Howdy are using Wordpress for your site platform? I'm new to the blog world but I'm trying to get started and create my own.
Do you require any coding knowledge to make your own blog?
Any help would be greatly appreciated!
my web page - real roulette
Apρrecіate this post. Will try іt out.
Feel frеe to suгf to my homepage; payday loans for bad credit
драйвера для samsung s5230
драйвера asus x50vl
wifi драйвер для acer aspire
amd smbus драйвер
драйвер кабеля для nokia 5800
http://idea-men.us/forums/index.php?PHPSESSID=mj8j8gbp24lfsituo4oj4gc477&action=profile;u=514902
http://www.sumaxfishing.com/forum/memberlist.php?mode=viewprofile&u=15285
http://ullis-hp.24.eu/files/profile.php?lookup=113
http://mnogodetstvo.ru/forum/memberlist.php?mode=viewprofile&u=16588
http://sfg.lt/forumas/index.php?/user/1845-arpoorta/
http://flavors.me/travlykaca
http://flavors.me/priciszienia
http://flavors.me/joinaircival
http://flavors.me/loaringsitvo
http://flavors.me/pergliriti
Post a Comment