[英]Passing Longitude and Latitude in Twitter Streaming API of Pakistan
I am having problem in passing longitude and latitude format of Pakistan in Twitter Streaming API . 我在Twitter Streaming API中传递巴基斯坦的经度和纬度格式时遇到问题。 This API provides some sample examples of passing longitude and latitude of some cities.
此API提供了一些传递某些城市的经度和纬度的示例 。 The location for San Fransisco in the API location example is given below and it works very well in my program.
下面给出了API位置示例中San Fransisco的位置,它在我的程序中运行良好。
-122.75,36.8,-121.75,37.8
-122.75,36.8,-121.75,37.8
But I am trying to use the following location to get tweets from Pakistan but the server rejects this location. 但我试图使用以下位置从巴基斯坦获取推文,但服务器拒绝此位置。
71.69,32.01,70.69,33.01
71.69,32.01,70.69,33.01
Kindly help me which 4 values separated by commas I should pass that will allow me to get tweets from Pakistan. 请帮助我通过逗号分隔的4个值,这样我就可以从巴基斯坦获得推文了。
Each bounding box should be specified as a pair of longitude and latitude pairs, with the southwest corner of the bounding box coming first.
每个边界框应指定为一对经度和纬度对, 边界框的西南角首先出现。
Your co-ordinates of 71.69,32.01,70.69,33.01
give this (which only seems to be a small part of Pakistan, might want to have a larger box): 你的
71.69,32.01,70.69,33.01
的坐标给出了这个(这似乎只是巴基斯坦的一小部分,可能想要一个更大的盒子):
So I think you box isn't being formed correctly because you're not giving the bottom left (South West) corner of it first. 所以我认为你的盒子没有正确形成,因为你没有先给它左下角(西南角)。 In order to give the box co-ordinates correctly you need to have them in the format
bottom-left-longitude, bottom-left-latitude, top-right-longitude, top-right-latitude
. 为了正确地给出方框坐标,你需要以
bottom-left-longitude, bottom-left-latitude, top-right-longitude, top-right-latitude
的格式。
Try using 70.7,32.1,71.7,33.1
(I've rounded the figures) instead which will give you the same area you suggested originally: 尝试使用
70.7,32.1,71.7,33.1
(我已将数字四舍五入),这将为您提供与您最初建议的区域相同的区域:
In order to get the whole of Pakistan try using: 62.9,25.2,73.3,35.2
which give you the area: 为了让整个巴基斯坦尝试使用:
62.9,25.2,73.3,35.2
,它给你的区域:
I use this website in order to get the latitude/longitude values. 我使用这个网站来获取纬度/经度值。 Note that the website gives you latitude, longitude but Twitter wants longitude, latitude.
请注意,该网站为您提供纬度,经度,但Twitter需要经度,纬度。 Remember to swap them around!
记得交换它们!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.