package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Packages
Package geodist finds distances between two geospatial shapes.
Package geogen provides utilities for generating various geospatial types.
Package geomfn contains functions that are used for geometry-based builtins.
Package geoprojbase is a minimal dependency package that contains basic metadata and data structures for SRIDs and their CRS transformations.
Package twkb implements the Tiny Well-known Binary (TWKB) encoding as described in https://github.com/TWKB/Specification/blob/master/twkb.md.
# Functions
AdjustGeomTSRID adjusts the SRID of a given geom.T.
BoundingBoxFromGeomTGeometryType returns an appropriate bounding box for a Geometry type.
GeometryToEncodedPolyline turns the provided geometry and precision into a Polyline ASCII.
GeomTContainsEmpty returns whether a geom.T contains any empty element.
GeomTSize returns the best estimate for the memory footprint of the geom.T object.
IsEmptyGeometryError returns true if the error is of type EmptyGeometryError.
IsLinearRingCCW returns whether a given linear ring is counter clock wise.
MakeGeography returns a new Geography.
MakeGeographyFromGeomT creates a new Geography from a geom.T object.
MakeGeographyUnsafe creates a geometry object that assumes spatialObject is from the DB.
MakeGeometry returns a new Geometry.
MakeGeometryFromGeomT creates a new Geometry object from a geom.T object.
MakeGeometryFromLayoutAndPointCoords makes a point with a given layout and ordered slice of coordinates.
MakeGeometryFromPointCoords makes a point from x, y coordinates.
MakeGeometryUnsafe creates a geometry object that assumes spatialObject is from the DB.
MustMakeGeographyFromGeomT enforces no error from MakeGeographyFromGeomT.
MustParseGeography behaves as ParseGeography, but panics if there is an error.
MustParseGeographyFromEWKB behaves as ParseGeographyFromEWKB, but panics if an error occurs.
MustParseGeometry behaves as ParseGeometry, but panics if there is an error.
MustParseGeometryFromEWKB behaves as ParseGeometryFromEWKB, but panics if an error occurs.
NewCartesianBoundingBox returns a properly initialized empty bounding box for cartesian plane types.
NewEmptyGeometryError returns an error indicating an empty geometry has been found.
NewGeomTIterator returns a new GeomTIterator.
NewMismatchingSRIDsError returns the error message for SRIDs of GeospatialTypes a and b being a mismatch.
NormalizeLatitudeDegrees normalizes latitudes to the range [-90, 90].
NormalizeLongitudeDegrees normalizes longitude to the range [-180, 180].
OutOfRangeError returns the error message to use if a spatial object contains an NaN coordinate.
ParseCartesianBoundingBox parses a box2d string into a bounding box.
ParseCartesianBoundingBoxFromGeoHash converts a GeoHash to a CartesianBoundingBox.
ParseEncodedPolyline takes the encoded polyline ASCII and precision, decodes the points and returns them as a geometry.
ParseGeography parses a Geography from a given text.
ParseGeographyFromEWKB parses the EWKB into a Geography.
ParseGeographyFromEWKBAndSRID parses the EWKB into a given Geography with the given SRID set.
ParseGeographyFromEWKBUnsafe returns a new Geography from an EWKB, without any SRID checks.
ParseGeographyFromEWKT parses the EWKT into a Geography.
ParseGeographyFromGeoJSON parses the GeoJSON into a given Geography.
ParseGeometry parses a Geometry from a given text.
ParseGeometryFromEWKB parses the EWKB into a Geometry.
ParseGeometryFromEWKBAndSRID parses the EWKB into a given Geometry with the given SRID set.
ParseGeometryFromEWKBUnsafe returns a new Geometry from an EWKB, without any SRID checks.
ParseGeometryFromEWKT parses the EWKT into a Geometry.
ParseGeometryFromGeoJSON parses the GeoJSON into a given Geometry.
ParseGeometryPointFromGeoHash converts a GeoHash to a Geometry Point using a Lng/Lat Point representation of the GeoHash.
S2RegionsFromGeomT converts an geom representation of an object to s2 regions.
ShapeTypeToLayout returns the geom.Layout of the given ShapeType.
SpatialObjectFitsColumnMetadata determines whether a GeospatialType is compatible with the given SRID and Shape.
SpatialObjectToEWKT transforms a given SpatialObject to EWKT.
SpatialObjectToGeoHash transforms a given SpatialObject to a GeoHash.
SpatialObjectToGeoJSON transforms a given SpatialObject to GeoJSON.
SpatialObjectToKML transforms a given SpatialObject to KML.
SpatialObjectToWKB transforms a given SpatialObject to WKB.
SpatialObjectToWKBHex transforms a given SpatialObject to WKBHex.
SpatialObjectToWKT transforms a given SpatialObject to WKT.
StringToByteOrder returns the byte order of string.
Summary returns a text summary of the contents of the geometry type.
# Constants
DefaultSRIDIsHint implies that the default SRID is only a hint and if the SRID is provided by the given EWKT/EWKB, it should be used instead.
DefaultSRIDShouldOverwrite implies the parsing function should overwrite the SRID with the defaultSRID.
EmptyBehaviorError will error with EmptyGeometryError when an empty geometry is encountered.
EmptyBehaviorOmit will omit an entry when an empty geometry is encountered.
FnExclusive indicates that the corresponding geo function should have exclusive semantics.
FnInclusive indicates that the corresponding geo function should have inclusive semantics.
FullPrecisionGeoJSON, when used in place of max decimal digits in GeoJSON functions, indicates to GeoJSON that it should use full precision when encoding JSON.
GeoHashAutoPrecision means to calculate the precision of SpatialObjectToGeoHash based on input, up to 32 characters.
GeoHashMaxPrecision is the maximum precision for GeoHashes.
MaxAllowedSplitPoints is the maximum number of points any spatial function may split to.
These should be kept with ST_AsGeoJSON in PostGIS.
These should be kept with ST_AsGeoJSON in PostGIS.
These should be kept with ST_AsGeoJSON in PostGIS.
These should be kept with ST_AsGeoJSON in PostGIS.
These should be kept with ST_AsGeoJSON in PostGIS.
# Variables
DefaultEWKBEncodingFormat is the default encoding format for EWKB.
# Structs
CartesianBoundingBox is the cartesian BoundingBox representation, meant for use for GEOMETRY types.
EmptyGeometryError is an error that is returned when the Geometry or any parts of its subgeometries are empty.
Geography is a spherical spatial object.
Geometry is planar spatial object.
GeomTIterator decomposes geom.T objects into individual components (i.e.
# Type aliases
EmptyBehavior is the behavior to adopt when an empty Geometry is encountered.
FnExclusivity is used to indicate whether a geo function should have inclusive or exclusive semantics.
SpatialObjectToGeoJSONFlag maps to the ST_AsGeoJSON flags for PostGIS.