Skip to main content
Question

TweetSearch does not contain geometry


I have used the TweetSearcher with search terms like @safesoftware and @McCartney , specifying "Search For Geocoded Results" = "Yes". But the inspector shows only the attributes, no geometry. I'm using FME Workbench 2016.0. What is wrong?

Thanks

7 replies

erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • April 21, 2016

As far as I know the attribute _tweet_geo contains the lat long representation of the location. That attribute can be used to create the geometry.


  • April 21, 2016
erik_jan wrote:

As far as I know the attribute _tweet_geo contains the lat long representation of the location. That attribute can be used to create the geometry.

I read that in the documentation, but the TweetSearch does not have an output field named _tweet_geo.


roland.martin
Forum|alt.badge.img+9

It looks as though that's a bug, but the geometry is still there, in the _tweet_search_result attribute, under place.bounding_box, where it's a GeoJSON object, so you should be able to do this (it worked for the one test I was able to do before I ran out of API calls anyway...)


mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • April 22, 2016

To me it looks like _tweet_geo just isn't being exposed. So just use an AttributeExposer and type in the name and it should appear. You'll still need to use a JSON transformer to extract the information.


mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • April 22, 2016
mark2atsafe wrote:

To me it looks like _tweet_geo just isn't being exposed. So just use an AttributeExposer and type in the name and it should appear. You'll still need to use a JSON transformer to extract the information.

I filed PR#69639 to ask for this to be exposed automatically. I see from the tweet result attribute there are probably hundreds of things we could expose, but geometry does seem to me to be more important than the rest. I also asked for an option to automatically replace the feature geometry with that of the tweet, instead of having to go down the JSON route.


roland.martin wrote:

It looks as though that's a bug, but the geometry is still there, in the _tweet_search_result attribute, under place.bounding_box, where it's a GeoJSON object, so you should be able to do this (it worked for the one test I was able to do before I ran out of API calls anyway...)

I have created the same work bench as @rollo.

 

 

In the second JSON Flattener_2 transformer i can not use the @Value(Place) JSON Document parameter, i have used @Value(_tweet_created_at). For the GeometryReplacer i can not use the @Value(bounding_box) parameter for the Geometry source, and i have used @Value(_tweet_created_at) parameter.

 

 

The work bench will run but the table will show a field named fme_rejection_code with the value INVALID_PARAMETER_GEOMETRY_SOURCE.

 

 

Any help is appreciated

 


roland.martin wrote:

It looks as though that's a bug, but the geometry is still there, in the _tweet_search_result attribute, under place.bounding_box, where it's a GeoJSON object, so you should be able to do this (it worked for the one test I was able to do before I ran out of API calls anyway...)

I am trying to use the Twitter workbench that @rollo had created.

When i am using the second JSON_Flattener_2 transformer with the @Value(_tweet_created_at) instead of the @Value(Place) when i try to use this parameter the input box is red and will not allow me to click ok. Also for the GeometryReplacer transformer is used @Value(_tweet_created_at) instead of the @Value(bounding_box) when i try to use this parameter the input box is red and will not allow me to click ok.

 

When i run the workbench i can create a feature but there is a column called fme_rejection_code that has the value INVALID_PARAMETER_GEOMETRY_SOURCE.

 

Any help is appreciated

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings