2011年3月14日月曜日

googleで地名から緯度経度を取得

$  curl "http://maps.google.com/maps/geo?q=千代田区外神田"
{
  "name": "千代田区外神田",
  "Status": {
    "code": 200,
    "request": "geocode"
  },
  "Placemark": [ {
    "id": "p1",
    "address": "Japan, Tokyo Chiyoda外神田",
    "AddressDetails": {
   "Accuracy" : 4,
   "Country" : {
      "AdministrativeArea" : {
         "AdministrativeAreaName" : "東京都",
         "Locality" : {
            "DependentLocality" : {
               "DependentLocalityName" : "外神田"
            },
            "LocalityName" : "千代田区"
         }
      },
      "CountryName" : "日本",
      "CountryNameCode" : "JP"
   }
},
    "ExtendedData": {
      "LatLonBox": {
        "north": 35.7100074,
        "south": 35.6918852,
        "east": 139.7856097,
        "west": 139.7215803
      }
    },
    "Point": {
      "coordinates": [ 139.7535951, 35.6940027, 0 ]
    }
  } ]
}

0 件のコメント: