Class: Google::Apis::VectortileV1::Area

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 an area. Used to represent regions such as water, parks, etc. Next ID: 10

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Area

Returns a new instance of Area.



101
102
103
# File 'generated/google/apis/vectortile_v1/classes.rb', line 101

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

Instance Attribute Details

#basemap_z_orderGoogle::Apis::VectortileV1::BasemapZOrder

Metadata necessary to determine the ordering of a particular basemap element relative to others. To render the basemap correctly, sort by z-plane, then z- grade, then z-within-grade. Corresponds to the JSON property basemapZOrder



35
36
37
# File 'generated/google/apis/vectortile_v1/classes.rb', line 35

def basemap_z_order
  @basemap_z_order
end

#has_external_edgesBoolean Also known as: has_external_edges?

True if the polygon is not entirely internal to the feature that it belongs to: that is, some of the edges are bordering another feature. Corresponds to the JSON property hasExternalEdges

Returns:

  • (Boolean)


41
42
43
# File 'generated/google/apis/vectortile_v1/classes.rb', line 41

def has_external_edges
  @has_external_edges
end

#internal_edgesArray<Fixnum>

When has_external_edges is true, the polygon has some edges that border another feature. This field indicates the internal edges that do not border another feature. Each value is an index into the vertices array, and denotes the start vertex of the internal edge (the next vertex in the boundary loop is the end of the edge). If the selected vertex is the last vertex in the boundary loop, then the edge between that vertex and the starting vertex of the loop is internal. This field may be used for styling. For example, building parapets could be placed only on the external edges of a building polygon, or water could be lighter colored near the external edges of a body of water. If has_external_edges is false, all edges are internal and this field will be empty. Corresponds to the JSON property internalEdges

Returns:

  • (Array<Fixnum>)


57
58
59
# File 'generated/google/apis/vectortile_v1/classes.rb', line 57

def internal_edges
  @internal_edges
end

#loop_breaksArray<Fixnum>

Identifies the boundary loops of the polygon. Only set for INDEXED_TRIANGLE polygons. Each value is an index into the vertices array indicating the beginning of a loop. For instance, values of [2, 5] would indicate loop_data contained 3 loops with indices 0-1, 2-4, and 5-end. This may be used in conjunction with the internal_edges field for styling polygon boundaries. Note that an edge may be on a polygon boundary but still internal to the feature. For example, a feature split across multiple tiles will have an internal polygon boundary edge along the edge of the tile. Corresponds to the JSON property loopBreaks

Returns:

  • (Array<Fixnum>)


69
70
71
# File 'generated/google/apis/vectortile_v1/classes.rb', line 69

def loop_breaks
  @loop_breaks
end

#triangle_indicesArray<Fixnum>

When the polygon encoding is of type INDEXED_TRIANGLES, this contains the indices of the triangle vertices in the vertex_offsets field. There are 3 vertex indices per triangle. Corresponds to the JSON property triangleIndices

Returns:

  • (Array<Fixnum>)


76
77
78
# File 'generated/google/apis/vectortile_v1/classes.rb', line 76

def triangle_indices
  @triangle_indices
end

#typeString

The polygon encoding type used for this area. Corresponds to the JSON property type

Returns:

  • (String)


81
82
83
# File 'generated/google/apis/vectortile_v1/classes.rb', line 81

def type
  @type
end

#vertex_offsetsGoogle::Apis::VectortileV1::Vertex2DList

2D vertex list used for lines and areas. Each entry represents an offset from the previous one in local tile coordinates. The first entry is offset from (0, 0). For example, the list of vertices [(1,1), (2, 2), (1, 2)] would be encoded in vertex offsets as [(1, 1), (1, 1), (-1, 0)]. Corresponds to the JSON property vertexOffsets



89
90
91
# File 'generated/google/apis/vectortile_v1/classes.rb', line 89

def vertex_offsets
  @vertex_offsets
end

#z_orderFixnum

The z-ordering of this area. Areas with a lower z-order should be rendered beneath areas with a higher z-order. This z-ordering does not imply anything about the altitude of the line relative to the ground, but it can be used to prevent z-fighting during rendering on the client. This z-ordering can only be used to compare areas, and cannot be compared with the z_order field in the Line message. The z-order may be negative or zero. Prefer Area.basemap_z_order. Corresponds to the JSON property zOrder

Returns:

  • (Fixnum)


99
100
101
# File 'generated/google/apis/vectortile_v1/classes.rb', line 99

def z_order
  @z_order
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



106
107
108
109
110
111
112
113
114
115
# File 'generated/google/apis/vectortile_v1/classes.rb', line 106

def update!(**args)
  @basemap_z_order = args[:basemap_z_order] if args.key?(:basemap_z_order)
  @has_external_edges = args[:has_external_edges] if args.key?(:has_external_edges)
  @internal_edges = args[:internal_edges] if args.key?(:internal_edges)
  @loop_breaks = args[:loop_breaks] if args.key?(:loop_breaks)
  @triangle_indices = args[:triangle_indices] if args.key?(:triangle_indices)
  @type = args[:type] if args.key?(:type)
  @vertex_offsets = args[:vertex_offsets] if args.key?(:vertex_offsets)
  @z_order = args[:z_order] if args.key?(:z_order)
end