私はすべての行にGPS座標を含むパンダ配列を持っています。この座標の速度制限を調べたいと思います。この問題については、私はこのようなHERESマップAPIを使用します。python request for map map api
for index, row in df2.iterrows():
waypoint = df2['Latitude'] +','+df2['Longitude']
payload = {'waypoint': waypoint, 'app_id': 'DemoAppId01082013GAL', 'app_code': 'DemoAppId01082013GAL'}
r = requests.post('https://route.cit.api.here.com/routing/7.2/getlinkinfo.json', params=payload)
df2['res'] = r.text
しかし、私は300の以上の行を続行したい場合、私は同じような応答を受け取るより:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>414 Request-URI Too Large</title>
</head><body>
<h1>Request-URI Too Large</h1>
<p>The requested URL's length exceeds the capacity
limit for this server.<br />
</p>
</body></html>
私はこのAPIに助けをhttps://developer.here.com/api-explorer/rest/routing/link-information-for-a-location
感謝を使用しています。
多分、支払いをせずに1日に300回以上リクエストすることはできません。 – furas
私の場合、この方法では1つの 'waypoint'しか使用できませんが、' df2'のすべてのデータを 'waypoint'として使用します。' waypoint = row ['Latitude'] + '、' + Row ['Longitude' ] 'と' row ['res'] = r.text' – furas
それは問題でした。私はdf2の列全体ではなく1つの行だけを使うべきです。手伝ってくれてありがとう!!!!!!! – crash40