How to Find list of latitude and longitude using p

2019-03-06 19:46发布

is there any way we can we find list of latitude and longitude using zip/pincode?

Input: 560103
Output : 
12.123456, 72.123456
12.123654, 72.366666
....   
....
12.123456, 72.123456

on google maps, list of lat-long polygon display would be like below map.. enter image description here

Note: Output is just for references, its not correct.

2条回答
\"骚年 ilove
2楼-- · 2019-03-06 20:38

Checkout Google Api

Check this out

http://maps.googleapis.com/maps/api/geocode/json?address=110029&sensor=true

This will give you the approx location of pincode 110029

All you have to do is parse the json end extract the coordinates

查看更多
霸刀☆藐视天下
3楼-- · 2019-03-06 20:42

u have to install pyzipcode from https://pypi.python.org/pypi/pyzipcode Later try this code

from pyzipcode import ZipCodeDatabase
zcdb = ZipCodeDatabase()
zipcode = zcdb[54115]
print zipcode.zip
print zipcode.city
print zipcode.state
print zipcode.longitude
print zipcode.latitude
print zipcode.timezone
查看更多
登录 后发表回答