1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854
|
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module VectortileV1
# Represents an area. Used to represent regions such as water, parks, etc. Next
# ID: 10
class Area
include Google::Apis::Core::Hashable
# 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`
# @return [Google::Apis::VectortileV1::BasemapZOrder]
attr_accessor :basemap_z_order
# 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`
# @return [Boolean]
attr_accessor :has_external_edges
alias_method :has_external_edges?, :has_external_edges
# 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`
# @return [Array<Fixnum>]
attr_accessor :internal_edges
# 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`
# @return [Array<Fixnum>]
attr_accessor :loop_breaks
# 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`
# @return [Array<Fixnum>]
attr_accessor :triangle_indices
# The polygon encoding type used for this area.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# 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`
# @return [Google::Apis::VectortileV1::Vertex2DList]
attr_accessor :vertex_offsets
# 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`
# @return [Fixnum]
attr_accessor :z_order
def initialize(**args)
update!(**args)
end
# Update properties of this object
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
end
# 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.
class BasemapZOrder
include Google::Apis::Core::Hashable
# The second most significant component of the ordering of a component to be
# rendered onto the basemap.
# Corresponds to the JSON property `zGrade`
# @return [Fixnum]
attr_accessor :z_grade
# The most significant component of the ordering of a component to be rendered
# onto the basemap.
# Corresponds to the JSON property `zPlane`
# @return [Fixnum]
attr_accessor :z_plane
# The least significant component of the ordering of a component to be rendered
# onto the basemap.
# Corresponds to the JSON property `zWithinGrade`
# @return [Fixnum]
attr_accessor :z_within_grade
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@z_grade = args[:z_grade] if args.key?(:z_grade)
@z_plane = args[:z_plane] if args.key?(:z_plane)
@z_within_grade = args[:z_within_grade] if args.key?(:z_within_grade)
end
end
# Represents a height-extruded area: a 3D prism with a constant X-Y plane cross
# section. Used to represent extruded buildings. A single building may consist
# of several extruded areas. The min_z and max_z fields are scaled to the size
# of the tile. An extruded area with a max_z value of 4096 has the same height
# as the width of the tile that it is on.
class ExtrudedArea
include Google::Apis::Core::Hashable
# Represents an area. Used to represent regions such as water, parks, etc. Next
# ID: 10
# Corresponds to the JSON property `area`
# @return [Google::Apis::VectortileV1::Area]
attr_accessor :area
# The z-value in local tile coordinates where the extruded area ends.
# Corresponds to the JSON property `maxZ`
# @return [Fixnum]
attr_accessor :max_z
# The z-value in local tile coordinates where the extruded area begins. This is
# non-zero for extruded areas that begin off the ground. For example, a building
# with a skybridge may have an extruded area component with a non-zero min_z.
# Corresponds to the JSON property `minZ`
# @return [Fixnum]
attr_accessor :min_z
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@area = args[:area] if args.key?(:area)
@max_z = args[:max_z] if args.key?(:max_z)
@min_z = args[:min_z] if args.key?(:min_z)
end
end
# A feature representing a single geographic entity.
class Feature
include Google::Apis::Core::Hashable
# The localized name of this feature. Currently only returned for roads.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Represents the geometry of a feature, that is, the shape that it has on the
# map. The local tile coordinate system has the origin at the north-west (upper-
# left) corner of the tile, and is scaled to 4096 units across each edge. The
# height (Z) axis has the same scale factor: an extruded area with a max_z value
# of 4096 has the same height as the width of the tile that it is on. There is
# no clipping boundary, so it is possible that some coordinates will lie outside
# the tile boundaries.
# Corresponds to the JSON property `geometry`
# @return [Google::Apis::VectortileV1::Geometry]
attr_accessor :geometry
# Place ID of this feature, suitable for use in Places API details requests.
# Corresponds to the JSON property `placeId`
# @return [String]
attr_accessor :place_id
# Relations to other features.
# Corresponds to the JSON property `relations`
# @return [Array<Google::Apis::VectortileV1::Relation>]
attr_accessor :relations
# Extra metadata relating to segments.
# Corresponds to the JSON property `segmentInfo`
# @return [Google::Apis::VectortileV1::SegmentInfo]
attr_accessor :segment_info
# The type of this feature.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@display_name = args[:display_name] if args.key?(:display_name)
@geometry = args[:geometry] if args.key?(:geometry)
@place_id = args[:place_id] if args.key?(:place_id)
@relations = args[:relations] if args.key?(:relations)
@segment_info = args[:segment_info] if args.key?(:segment_info)
@type = args[:type] if args.key?(:type)
end
end
# A tile containing information about the map features located in the region it
# covers.
class FeatureTile
include Google::Apis::Core::Hashable
# 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`
# @return [Google::Apis::VectortileV1::TileCoordinates]
attr_accessor :coordinates
# Features present on this map tile.
# Corresponds to the JSON property `features`
# @return [Array<Google::Apis::VectortileV1::Feature>]
attr_accessor :features
# Resource name of the tile. The tile resource name is prefixed by its
# collection ID `tiles/` followed by the resource ID, which encodes the tile's
# global x and y coordinates and zoom level as `@,,z`. For example, `tiles/@1,2,
# 3z`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Data providers for the data contained in this tile.
# Corresponds to the JSON property `providers`
# @return [Array<Google::Apis::VectortileV1::ProviderInfo>]
attr_accessor :providers
# Tile response status code to support tile caching.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# An opaque value, usually less than 30 characters, that contains version info
# about this tile and the data that was used to generate it. The client should
# store this value in its tile cache and pass it back to the API in the
# client_tile_version_id field of subsequent tile requests in order to enable
# the API to detect when the new tile would be the same as the one the client
# already has in its cache. Also see STATUS_OK_DATA_UNCHANGED.
# Corresponds to the JSON property `versionId`
# @return [String]
attr_accessor :version_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@coordinates = args[:coordinates] if args.key?(:coordinates)
@features = args[:features] if args.key?(:features)
@name = args[:name] if args.key?(:name)
@providers = args[:providers] if args.key?(:providers)
@status = args[:status] if args.key?(:status)
@version_id = args[:version_id] if args.key?(:version_id)
end
end
# 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.
class FirstDerivativeElevationGrid
include Google::Apis::Core::Hashable
# A multiplier applied to the altitude fields below to extract the actual
# altitudes in meters from the elevation grid.
# Corresponds to the JSON property `altitudeMultiplier`
# @return [Float]
attr_accessor :altitude_multiplier
# Rows of points containing altitude data making up the elevation grid. Each row
# is the same length. Rows are ordered from north to south. E.g: rows[0] is the
# north-most row, and rows[n] is the south-most row.
# Corresponds to the JSON property `rows`
# @return [Array<Google::Apis::VectortileV1::Row>]
attr_accessor :rows
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@altitude_multiplier = args[:altitude_multiplier] if args.key?(:altitude_multiplier)
@rows = args[:rows] if args.key?(:rows)
end
end
# Represents the geometry of a feature, that is, the shape that it has on the
# map. The local tile coordinate system has the origin at the north-west (upper-
# left) corner of the tile, and is scaled to 4096 units across each edge. The
# height (Z) axis has the same scale factor: an extruded area with a max_z value
# of 4096 has the same height as the width of the tile that it is on. There is
# no clipping boundary, so it is possible that some coordinates will lie outside
# the tile boundaries.
class Geometry
include Google::Apis::Core::Hashable
# The areas present in this geometry.
# Corresponds to the JSON property `areas`
# @return [Array<Google::Apis::VectortileV1::Area>]
attr_accessor :areas
# The extruded areas present in this geometry.
# Corresponds to the JSON property `extrudedAreas`
# @return [Array<Google::Apis::VectortileV1::ExtrudedArea>]
attr_accessor :extruded_areas
# The lines present in this geometry.
# Corresponds to the JSON property `lines`
# @return [Array<Google::Apis::VectortileV1::Line>]
attr_accessor :lines
# The modeled volumes present in this geometry.
# Corresponds to the JSON property `modeledVolumes`
# @return [Array<Google::Apis::VectortileV1::ModeledVolume>]
attr_accessor :modeled_volumes
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@areas = args[:areas] if args.key?(:areas)
@extruded_areas = args[:extruded_areas] if args.key?(:extruded_areas)
@lines = args[:lines] if args.key?(:lines)
@modeled_volumes = args[:modeled_volumes] if args.key?(:modeled_volumes)
end
end
# Represents a 2D polyline. Used to represent segments such as roads, train
# tracks, etc.
class Line
include Google::Apis::Core::Hashable
# 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`
# @return [Google::Apis::VectortileV1::BasemapZOrder]
attr_accessor :basemap_z_order
# 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`
# @return [Google::Apis::VectortileV1::Vertex2DList]
attr_accessor :vertex_offsets
# The z-order of the line. Lines with a lower z-order should be rendered beneath
# lines with a higher z-order. This z-ordering does not imply anything about the
# altitude of the area relative to the ground, but it can be used to prevent z-
# fighting during rendering on the client. In general, larger and more important
# road features will have a higher z-order line associated with them. This z-
# ordering can only be used to compare lines, and cannot be compared with the
# z_order field in the Area message. The z-order may be negative or zero. Prefer
# Line.basemap_z_order.
# Corresponds to the JSON property `zOrder`
# @return [Fixnum]
attr_accessor :z_order
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@basemap_z_order = args[:basemap_z_order] if args.key?(:basemap_z_order)
@vertex_offsets = args[:vertex_offsets] if args.key?(:vertex_offsets)
@z_order = args[:z_order] if args.key?(:z_order)
end
end
# Represents a modeled volume in 3D space. Used to represent 3D buildings.
class ModeledVolume
include Google::Apis::Core::Hashable
# The triangle strips present in this mesh.
# Corresponds to the JSON property `strips`
# @return [Array<Google::Apis::VectortileV1::TriangleStrip>]
attr_accessor :strips
# 3D vertex list used for modeled volumes. Each entry represents an offset from
# the previous one in local tile coordinates. The first coordinate is offset
# from (0, 0, 0).
# Corresponds to the JSON property `vertexOffsets`
# @return [Google::Apis::VectortileV1::Vertex3DList]
attr_accessor :vertex_offsets
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@strips = args[:strips] if args.key?(:strips)
@vertex_offsets = args[:vertex_offsets] if args.key?(:vertex_offsets)
end
end
# Information about the data providers that should be included in the
# attribution string shown by the client.
class ProviderInfo
include Google::Apis::Core::Hashable
# Attribution string for this provider. This string is not localized.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@description = args[:description] if args.key?(:description)
end
end
# 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.
class Relation
include Google::Apis::Core::Hashable
# Zero-based index to look up the related feature from the list of features in
# the tile.
# Corresponds to the JSON property `relatedFeatureIndex`
# @return [Fixnum]
attr_accessor :related_feature_index
# Relation type between the origin feature to the related feature.
# Corresponds to the JSON property `relationType`
# @return [String]
attr_accessor :relation_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
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
end
# Extra metadata relating to roads.
class RoadInfo
include Google::Apis::Core::Hashable
# Road has signage discouraging or prohibiting use by the general public. E.g.,
# roads with signs that say "Private", or "No trespassing."
# Corresponds to the JSON property `isPrivate`
# @return [Boolean]
attr_accessor :is_private
alias_method :is_private?, :is_private
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@is_private = args[:is_private] if args.key?(:is_private)
end
end
# A row of altitude points in the elevation grid, ordered from west to east.
class Row
include Google::Apis::Core::Hashable
# The difference between each successive pair of altitudes, from west to east.
# The first, westmost point, is just the altitude rather than a diff. The units
# are specified by the altitude_multiplier parameter above; the value in meters
# is given by altitude_multiplier * altitude_diffs[n]. The altitude row (in
# metres above sea level) can be reconstructed with: a[0] = altitude_diffs[0] *
# altitude_multiplier when n > 0, a[n] = a[n-1] + altitude_diffs[n-1] *
# altitude_multiplier.
# Corresponds to the JSON property `altitudeDiffs`
# @return [Array<Fixnum>]
attr_accessor :altitude_diffs
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@altitude_diffs = args[:altitude_diffs] if args.key?(:altitude_diffs)
end
end
# 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.
class SecondDerivativeElevationGrid
include Google::Apis::Core::Hashable
# A multiplier applied to the elements in the encoded data to extract the actual
# altitudes in meters.
# Corresponds to the JSON property `altitudeMultiplier`
# @return [Float]
attr_accessor :altitude_multiplier
# The number of columns included in the encoded elevation data (i.e. the
# horizontal resolution of the grid).
# Corresponds to the JSON property `columnCount`
# @return [Fixnum]
attr_accessor :column_count
# A stream of elements each representing a point on the tile running across each
# row from left to right, top to bottom. There will be precisely
# horizontal_resolution * vertical_resolution elements in the stream. The
# elements are not the heights, rather the second order derivative of the values
# one would expect in a stream of height data. Each element is a varint with the
# following encoding: -----------------------------------------------------------
# -------------| | Head Nibble | ------------------------------------------------
# ------------------------| | Bit 0 | Bit 1 | Bits 2-3 | | Terminator| Sign (1=
# neg) | Least significant 2 bits of absolute error | ---------------------------
# ---------------------------------------------| | Tail Nibble #1 | -------------
# -----------------------------------------------------------| | Bit 0 | Bit 1-3
# | | Terminator| Least significant 3 bits of absolute error | ------------------
# ------------------------------------------------------| | ... | Tail Nibble #n
# | ------------------------------------------------------------------------| |
# Bit 0 | Bit 1-3 | | Terminator| Least significant 3 bits of absolute error | --
# ----------------------------------------------------------------------|
# Corresponds to the JSON property `encodedData`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :encoded_data
# The number of rows included in the encoded elevation data (i.e. the vertical
# resolution of the grid).
# Corresponds to the JSON property `rowCount`
# @return [Fixnum]
attr_accessor :row_count
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@altitude_multiplier = args[:altitude_multiplier] if args.key?(:altitude_multiplier)
@column_count = args[:column_count] if args.key?(:column_count)
@encoded_data = args[:encoded_data] if args.key?(:encoded_data)
@row_count = args[:row_count] if args.key?(:row_count)
end
end
# Extra metadata relating to segments.
class SegmentInfo
include Google::Apis::Core::Hashable
# Extra metadata relating to roads.
# Corresponds to the JSON property `roadInfo`
# @return [Google::Apis::VectortileV1::RoadInfo]
attr_accessor :road_info
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@road_info = args[:road_info] if args.key?(:road_info)
end
end
# A tile containing information about the terrain located in the region it
# covers.
class TerrainTile
include Google::Apis::Core::Hashable
# 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`
# @return [Google::Apis::VectortileV1::TileCoordinates]
attr_accessor :coordinates
# 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`
# @return [Google::Apis::VectortileV1::FirstDerivativeElevationGrid]
attr_accessor :first_derivative
# 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`
# @return [String]
attr_accessor :name
# 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`
# @return [Google::Apis::VectortileV1::SecondDerivativeElevationGrid]
attr_accessor :second_derivative
def initialize(**args)
update!(**args)
end
# Update properties of this object
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
end
# 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.
class TileCoordinates
include Google::Apis::Core::Hashable
# Required. The x coordinate.
# Corresponds to the JSON property `x`
# @return [Fixnum]
attr_accessor :x
# Required. The y coordinate.
# Corresponds to the JSON property `y`
# @return [Fixnum]
attr_accessor :y
# Required. The Google Maps API zoom level.
# Corresponds to the JSON property `zoom`
# @return [Fixnum]
attr_accessor :zoom
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@x = args[:x] if args.key?(:x)
@y = args[:y] if args.key?(:y)
@zoom = args[:zoom] if args.key?(:zoom)
end
end
# Represents a strip of triangles. Each triangle uses the last edge of the
# previous one. The following diagram shows an example of a triangle strip, with
# each vertex labeled with its index in the vertex_index array. (1)-----(3) / \ /
# \ / \ / \ / \ / \ (0)-----(2)-----(4) Vertices may be in either clockwise or
# counter-clockwise order.
class TriangleStrip
include Google::Apis::Core::Hashable
# Index into the vertex_offset array representing the next vertex in the
# triangle strip.
# Corresponds to the JSON property `vertexIndices`
# @return [Array<Fixnum>]
attr_accessor :vertex_indices
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@vertex_indices = args[:vertex_indices] if args.key?(:vertex_indices)
end
end
# 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)].
class Vertex2DList
include Google::Apis::Core::Hashable
# List of x-offsets in local tile coordinates.
# Corresponds to the JSON property `xOffsets`
# @return [Array<Fixnum>]
attr_accessor :x_offsets
# List of y-offsets in local tile coordinates.
# Corresponds to the JSON property `yOffsets`
# @return [Array<Fixnum>]
attr_accessor :y_offsets
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@x_offsets = args[:x_offsets] if args.key?(:x_offsets)
@y_offsets = args[:y_offsets] if args.key?(:y_offsets)
end
end
# 3D vertex list used for modeled volumes. Each entry represents an offset from
# the previous one in local tile coordinates. The first coordinate is offset
# from (0, 0, 0).
class Vertex3DList
include Google::Apis::Core::Hashable
# List of x-offsets in local tile coordinates.
# Corresponds to the JSON property `xOffsets`
# @return [Array<Fixnum>]
attr_accessor :x_offsets
# List of y-offsets in local tile coordinates.
# Corresponds to the JSON property `yOffsets`
# @return [Array<Fixnum>]
attr_accessor :y_offsets
# List of z-offsets in local tile coordinates.
# Corresponds to the JSON property `zOffsets`
# @return [Array<Fixnum>]
attr_accessor :z_offsets
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@x_offsets = args[:x_offsets] if args.key?(:x_offsets)
@y_offsets = args[:y_offsets] if args.key?(:y_offsets)
@z_offsets = args[:z_offsets] if args.key?(:z_offsets)
end
end
end
end
end
|