github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/geo/geopb/types.go (about)

     1  // Copyright 2020 The Cockroach Authors.
     2  //
     3  // Use of this software is governed by the Business Source License
     4  // included in the file licenses/BSL.txt.
     5  //
     6  // As of the Change Date specified in that file, in accordance with
     7  // the Business Source License, use of this software will be governed
     8  // by the Apache License, Version 2.0, included in the file
     9  // licenses/APL.txt.
    10  
    11  package geopb
    12  
    13  // The following are the common standard SRIDs that we support.
    14  const (
    15  	// UnknownSRID is the default SRID if none is provided.
    16  	UnknownSRID = SRID(0)
    17  	// DefaultGeometrySRID is the same as being unknown.
    18  	DefaultGeometrySRID = UnknownSRID
    19  	// DefaultGeographySRID (aka 4326) is the GPS lat/lng we all know and love.
    20  	// In this system, (long, lat) corresponds to (X, Y), bounded by
    21  	// ([-180, 180], [-90 90]).
    22  	DefaultGeographySRID = SRID(4326)
    23  )
    24  
    25  // SRID is a Spatial Reference Identifer. All geometry and geography shapes are
    26  // stored and represented as using coordinates that are bare floats. SRIDs tie these
    27  // floats to the planar or spherical coordinate system, allowing them to be interpreted
    28  // and compared.
    29  //
    30  // The zero value is special and means an unknown coordinate system.
    31  type SRID int32
    32  
    33  // WKT is the Well Known Text form of a spatial object.
    34  type WKT string
    35  
    36  // EWKT is the Extended Well Known Text form of a spatial object.
    37  type EWKT string
    38  
    39  // WKB is the Well Known Bytes form of a spatial object.
    40  type WKB []byte
    41  
    42  // EWKB is the Extended Well Known Bytes form of a spatial object.
    43  type EWKB []byte