View Source Tw.V1_1.BoundingBox (Tw v0.1.1)

Bounding Box data structure and related functions. https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/geo

Link to this section Summary

Types

t()
fielddescription
coordinatesA series of longitude and latitude points, defining a box which will contain the Place entity this bounding box is related to. Each point is an array in the form of [longitude, latitude]. Points are grouped into an array per bounding box. Bounding box arrays are wrapped in one additional array to be compatible with the polygon notation. Example: {[ [ [ -74.026675, 40.683935 ], [ -74.026675, 40.877483 ], [ -73.910408, 40.877483 ], [ -73.910408, 40.3935 ] ] ] }.
typeThe type of data encoded in the coordinates property. This will be “Polygon” for bounding boxes and “Point” for Tweets with exact coordinates. Example: "Polygon".

Functions

Decode JSON-decoded map into t/0

Link to this section Types

Specs

t() :: %Tw.V1_1.BoundingBox{coordinates: [[[float()]]], type: binary()}
fielddescription
coordinatesA series of longitude and latitude points, defining a box which will contain the Place entity this bounding box is related to. Each point is an array in the form of [longitude, latitude]. Points are grouped into an array per bounding box. Bounding box arrays are wrapped in one additional array to be compatible with the polygon notation. Example: {[ [ [ -74.026675, 40.683935 ], [ -74.026675, 40.877483 ], [ -73.910408, 40.877483 ], [ -73.910408, 40.3935 ] ] ] }.
typeThe type of data encoded in the coordinates property. This will be “Polygon” for bounding boxes and “Point” for Tweets with exact coordinates. Example: "Polygon".

Link to this section Functions

Specs

decode!(map()) :: t()

Decode JSON-decoded map into t/0