kkurni
kkurni

Reputation: 15

Can Bluemix Geospatial Analytics access nested values?

I'm currently working on something that uses Geospatial Analytics for the fencing, and the payload they are sending is in nested structures. Can Geospatial services read these nested values? If not, what would be the workaround? Currently what I'm thinking about for the work around is to subscribe to the topic that has the nested value, flatten it and publish it again to geospatial services. So I'm asking the experts here if they have a better solution for it.

Example:

{ "GPS" {
id : <id>, lat : <lat>, lng : <lng> } }

Upvotes: 0

Views: 29

Answers (1)

Paul Allen
Paul Allen

Reputation: 41

The Geospatial Analytics service on Bluemix requires that the device id, latitude, and longitude attributes appear as top level fields in the json payload. If you can change the code that publishes the original message, that would be the best work around.

If you can't change the original message, your suggestion to have another application transform the message will work. You should publish the transformed message to a different topic and specify that as the topic for the Geospatial Analytics service to subscribe to.

Upvotes: 0

Related Questions