Question

TweetSearch does not contain geometry

  • 21 April 2016
  • 7 replies
  • 0 views

Badge +1
  • Participant
  • 126 replies

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

Userlevel 2
Badge +16

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.

Badge +1

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.

Badge +7

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...)

Userlevel 4
Badge +25

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.

Userlevel 4
Badge +25

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.

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

 

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