Obwohl es wie das gleiche Problem wie twitter4j geo streaming latitude/longitude for Hongkong aussehen könnte, aber es ist nicht.twitter4j geo Streaming Breite/Länge für Singapur und darüber hinaus
Ich habe das Streaming-Beispiel-Code von twitter4j
modifiziert und produziert diese:
$ javac -classpath twitter4j-core-4.0.4.jar:twitter4j-media-support-4.0.4.jar:twitter4j-async-4.0.4.jar:twitter4j-examples-4.0.4.jar:twitter4j-stream-4.0.4.jar PrintFilterLocationStream.java
und laufen mit:
java -cp .:twitter4j-core-4.0.4.jar:twitter4j-media-support-4.0.4.jar:twitter4j-async-4.0.4.jar:twitter4j-examples-4.0.4.jar:twitter4j-stream-4.0.4.jar PrintFilterLocationStream "{{-126.562500,30.448674},{-61.171875,44.087585}}"
https://www.dropbox.com/s/gj75fghtqy5jajf/tweity.zip?dl=0
Es kann mit kompiliert werden Es funktioniert ganz gut, wenn ich die Grenze bekomme G-Box korrekt, siehe Can't get location filters to work using Twitter4J
Aber für Singapur habe ich den Standort von http://isithackday.com/geoplanet-explorer/index.php?woeid=24703045 überprüft, aber irgendwie beschweren sich, dass es nicht gültig ist.
[out]:
[Wed Jul 06 05:48:15 SGT 2016]Parameter not accepted with the role. 406:Returned by the Search API when an invalid format is specified in the request.
Returned by the Streaming API when one or more of the parameters are not suitable for the resource. The track parameter, for example, would throw this error if:
The track keyword is too long or too short.
The bounding box specified is invalid.
No predicates defined for filtered resource, for example, neither track nor follow parameter defined.
Follow userid cannot be read.
Latitude/longitude are not valid: 1.31, 103.75, 1.47, 103.87
406:Returned by the Search API when an invalid format is specified in the request.
Returned by the Streaming API when one or more of the parameters are not suitable for the resource. The track parameter, for example, would throw this error if:
The track keyword is too long or too short.
The bounding box specified is invalid.
No predicates defined for filtered resource, for example, neither track nor follow parameter defined.
Follow userid cannot be read.
Latitude/longitude are not valid: 1.31, 103.75, 1.47, 103.87
Ich habe auch eine größere Box versucht ("{{1,103},{2,104}}"
für Singapur), aber es immer noch nicht gültig.
Ich habe versucht mit "{{0.66364, 98.935059},{7.58378, 119.448433}}"
für Mlaysia nach http://isithackday.com/geoplanet-explorer/index.php?start=malaysia, aber es ist auch nicht gültig. Ebenso funktioniert "{{ -11.00485, 94.969833},{6.07573, 141.021805}}"
für Indonesien nicht auch (http://isithackday.com/geoplanet-explorer/index.php?start=indonesia).
Was sollte die Breite/Länge Wert für Singapur sein?
Aber was ist mit Malayisa oder Indonesien?
Gibt es eine Liste mit Begrenzungsrahmen für Länder/Städte? Es sieht so aus, als könnte es leicht eine statische Liste sein?