Class: Google::Apis::VectortileV1::Relation

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

Overview

Represents a relation to another feature in the tile. For example, a building might be occupied by a given POI. The related feature can be retrieved using the related feature index.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Relation

Returns a new instance of Relation.



507
508
509
# File 'generated/google/apis/vectortile_v1/classes.rb', line 507

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

Instance Attribute Details

Zero-based index to look up the related feature from the list of features in the tile. Corresponds to the JSON property relatedFeatureIndex

Returns:

  • (Fixnum)


500
501
502
# File 'generated/google/apis/vectortile_v1/classes.rb', line 500

def related_feature_index
  @related_feature_index
end

#relation_typeString

Relation type between the origin feature to the related feature. Corresponds to the JSON property relationType

Returns:

  • (String)


505
506
507
# File 'generated/google/apis/vectortile_v1/classes.rb', line 505

def relation_type
  @relation_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



512
513
514
515
# File 'generated/google/apis/vectortile_v1/classes.rb', line 512

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