Class: Google::Apis::AreainsightsV1::Polygon

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/areainsights_v1/classes.rb,
lib/google/apis/areainsights_v1/representations.rb,
lib/google/apis/areainsights_v1/representations.rb

Overview

A polygon is represented by a series of connected coordinates in an counterclockwise ordered sequence. The coordinates form a closed loop and define a filled region. The first and last coordinates are equivalent, and they must contain identical values. The format is a simplified version of GeoJSON polygons (we only support one counterclockwise exterior ring).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Polygon

Returns a new instance of Polygon.



291
292
293
# File 'lib/google/apis/areainsights_v1/classes.rb', line 291

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#coordinatesArray<Google::Apis::AreainsightsV1::LatLng>

Optional. The coordinates that define the polygon. Corresponds to the JSON property coordinates



289
290
291
# File 'lib/google/apis/areainsights_v1/classes.rb', line 289

def coordinates
  @coordinates
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



296
297
298
# File 'lib/google/apis/areainsights_v1/classes.rb', line 296

def update!(**args)
  @coordinates = args[:coordinates] if args.key?(:coordinates)
end