GeostorePolygonProto

GoogleApi.ContentWarehouse.V1.Model.GeostorePolygonProto


Table of Contents ▼

Jump to a specific part of the page:

Description

A general non-self-intersecting spherical polygon, consisting of one or more loops defining multiple disconnected regions possibly with holes. All loops should be oriented CCW around the region they define. This applies to the exterior loop(s) as well as any holes. Within MapFacts (and underlying infrastructure) the data fields may be replaced by a single shape_id stored in internal_feature. Any such PolygonProtos shouldn't be expected to work with public functions in //geostore/base/public/polygon.h.

Attributes List

This module has the following attributes (case-insensitive ascending order):

View Attributes

Attributes

  1. baseMeters (type: number(), default: nil)
    - The polygon loops above are basically flat: each point has a latitude and a longitude but no altitude. We don't want to build real 3D models here, but we do want to be able to generate 2.5D models. A 2.5D model is built by translating the flat polygon upward some distance (base) then extruding it upward some additional distance (height). The elevation of the bottom of the extruded polygon (above ground level).
  2. cellId (type: String.t, default: nil)
    - DEPRECATED This is part of a splitting strategy for large polygons, which was never fully launched and we decided not to pursue. For features with very complex polygonal geometry, we break up the polygon into pieces that align with S2 cells at various levels. We do this for performance reasons as some geometry operations have quadratic complexity with regards to the total number of vertices. In these cases, we store the S2 cell ID corresponding to the piece of the overall polygon that is described by this specific PolygonProto message. Each polygon piece is expected to be fully contained by the S2 cell corresponding to this cell ID. However, note that the S2 cell ID is not required to correspond to the smallest S2 cell that fully contains the polygon (and often won't be). In addition, polygon pieces are required to not have any overlap (which translates to having entirely disjoint S2 cell IDs, i.e. one can not be parent (or grand parent, etc.) of another).
  3. encoded (type: String.t, default: nil)
    - Encoding of the polygon using S2Polygon::Encode()'s compressed representation.
  4. heightMeters (type: number(), default: nil)
    - The distance from the bottom of the extruded polygon to the top.
  5. loop (type: list(GoogleApi.ContentWarehouse.V1.Model.GeostorePolyLineProto), default: nil)
    - DEPRECATED We have switched to using exclusively the encoded form in the wire format to and from MapFacts, so this field should never be populated there. See go/encoded-polygons for more info. "Classic" polygon representation, defined by one or more loops. The last vertex of each polyline is implicitly connected to the first vertex. All loops should be specified in CCW order.
  6. metadata (type: GoogleApi.ContentWarehouse.V1.Model.GeostoreFieldMetadataProto, default: nil)
    - Field-level metadata for this polygon.
  7. temporaryData (type: GoogleApi.ContentWarehouse.V1.Model.Proto2BridgeMessageSet, default: nil)
    - A place for clients to attach arbitrary data to a polygon. Never set in MapFacts.
  8. unsuitableForDisplay (type: boolean(), default: nil)
    - Some polygons are known to be rough proxies for a feature's "real" polygonal representation. Such polygons are generally unsuitable for display. Rendering clients should not show these in most cases. Polygons unsuitable for display do have other uses, such as user location or containment analysis, or as an input to learning algorithms. This is an orthogonal concept to FeatureProto.synthetic_geometry, which only pertains to the method by which a polygon was created, rather than its fidelity to ground truth. For features that have multiple polygons, this bit should be consistently set to the same value on all polygons.

Type

@type t() :: %GoogleApi.ContentWarehouse.V1.Model.GeostorePolygonProto{
baseMeters: number() | nil,
cellId: String.t() | nil,
encoded: String.t() | nil,
heightMeters: number() | nil,
loop: [GoogleApi.ContentWarehouse.V1.Model.GeostorePolyLineProto.t()] | nil,
metadata: GoogleApi.ContentWarehouse.V1.Model.GeostoreFieldMetadataProto.t() | nil,
temporaryData: GoogleApi.ContentWarehouse.V1.Model.Proto2BridgeMessageSet.t() | nil,
unsuitableForDisplay: boolean() | nil
}

Function

@spec decode(struct(), keyword()) :: struct()

Data sourced from HexDocs : GoogleApi.ContentWarehouse.V1.Model.GeostorePolygonProto