Class: Google::Apis::VectortileV1::TerrainTile

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

A tile containing information about the terrain located in the region it covers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TerrainTile

Returns a new instance of TerrainTile.



712
713
714
# File 'generated/google/apis/vectortile_v1/classes.rb', line 712

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

Instance Attribute Details

#coordinatesGoogle::Apis::VectortileV1::TileCoordinates

Global tile coordinates. Global tile coordinates reference a specific tile on the map at a specific zoom level. The origin of this coordinate system is always at the northwest corner of the map, with x values increasing from west to east and y values increasing from north to south. Tiles are indexed using x, y coordinates from that origin. The zoom level containing the entire world in a tile is 0, and it increases as you zoom in. Zoom level n + 1 will contain 4 times as many tiles as zoom level n. The zoom level controls the level of detail of the data that is returned. In particular, this affects the set of feature types returned, their density, and geometry simplification. The exact tile contents may change over time, but care will be taken to keep supporting the most important use cases. For example, zoom level 15 shows roads for orientation and planning in the local neighborhood and zoom level 17 shows buildings to give users on foot a sense of situational awareness. Corresponds to the JSON property coordinates



670
671
672
# File 'generated/google/apis/vectortile_v1/classes.rb', line 670

def coordinates
  @coordinates
end

#first_derivativeGoogle::Apis::VectortileV1::FirstDerivativeElevationGrid

A packed representation of a 2D grid of uniformly spaced points containing elevation data. Each point within the grid represents the altitude in meters above average sea level at that location within the tile. Elevations provided are (generally) relative to the EGM96 geoid, however some areas will be relative to NAVD88. EGM96 and NAVD88 are off by no more than 2 meters. The grid is oriented north-west to south-east, as illustrated: rows[0].a[0] rows[0] .a[m] +-----------------+ | | | N | | ^ | | | | | W <-----> E | | | | | v | | S | | | +-----------------+ rows[n].a[0] rows[n].a[m] Rather than storing the altitudes directly, we store the diffs between them as integers at some requested level of precision to take advantage of integer packing. The actual altitude values a[] can be reconstructed using the scale and each row's first_altitude and altitude_diff fields. Corresponds to the JSON property firstDerivative



686
687
688
# File 'generated/google/apis/vectortile_v1/classes.rb', line 686

def first_derivative
  @first_derivative
end

#nameString

Resource name of the tile. The tile resource name is prefixed by its collection ID terrain/ followed by the resource ID, which encodes the tile's global x and y coordinates and zoom level as @,,z. For example, terrain/@1, 2,3z. Corresponds to the JSON property name

Returns:

  • (String)


694
695
696
# File 'generated/google/apis/vectortile_v1/classes.rb', line 694

def name
  @name
end

#second_derivativeGoogle::Apis::VectortileV1::SecondDerivativeElevationGrid

A packed representation of a 2D grid of uniformly spaced points containing elevation data. Each point within the grid represents the altitude in meters above average sea level at that location within the tile. Elevations provided are (generally) relative to the EGM96 geoid, however some areas will be relative to NAVD88. EGM96 and NAVD88 are off by no more than 2 meters. The grid is oriented north-west to south-east, as illustrated: rows[0].a[0] rows[0] .a[m] +-----------------+ | | | N | | ^ | | | | | W <-----> E | | | | | v | | S | | | +-----------------+ rows[n].a[0] rows[n].a[m] Rather than storing the altitudes directly, we store the diffs of the diffs between them as integers at some requested level of precision to take advantage of integer packing. Note that the data is packed in such a way that is fast to decode in Unity and that further optimizes wire size. Corresponds to the JSON property secondDerivative



710
711
712
# File 'generated/google/apis/vectortile_v1/classes.rb', line 710

def second_derivative
  @second_derivative
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



717
718
719
720
721
722
# File 'generated/google/apis/vectortile_v1/classes.rb', line 717

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