Documentation
¶
Overview ¶
Package geoprojbase is a minimal dependency package that contains basic metadata and data structures for SRIDs and their CRS transformations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrProjectionNotFound error = errors.Newf("projection not found")
ErrProjectionNotFound indicates a project was not found.
var MakeSpheroid = func(radius, flattening float64) (Spheroid, error) { return nil, errors.AssertionFailedf("MakeSpheroid not initialised") }
MakeSpheroid is an injectable function which creates a spheroid. If you hit the assertion here, you may want to blank import geographic lib, e.g. _ "github.com/cockroachdb/cockroachdb-parser/pkg/geo/geographiclib".
Functions ¶
This section is empty.
Types ¶
type Proj4Text ¶
type Proj4Text struct {
// contains filtered or unexported fields
}
Proj4Text is the text representation of a PROJ4 transformation.
func MakeProj4Text ¶
MakeProj4Text returns a new Proj4Text with spec based on the given string.
type ProjInfo ¶
type ProjInfo struct {
// SRID is the SRID of the projection.
SRID geopb.SRID
// AuthName is the authority who has provided this projection (e.g. ESRI, EPSG).
AuthName string
// AuthSRID is the SRID the given AuthName interprets the SRID as.
AuthSRID int
// SRText is the WKT representation of the projection.
SRText string
// Proj4Text is the PROJ4 text representation of the projection.
Proj4Text Proj4Text
// Bounds defines the bounds (projected or lat/lng) of the given coordinate system.
Bounds Bounds
// IsLatLng stores whether the projection is a LatLng based projection (denormalized from above)
IsLatLng bool
// The spheroid represented by the SRID.
Spheroid Spheroid
}
ProjInfo is a struct containing metadata related to a given SRID.
func AllProjections ¶
func AllProjections() []ProjInfo
AllProjections returns a sorted list of all projections.
func MustProjection ¶
MustProjection returns the ProjInfo for the given SRID, panicking if the projection does not exist.
type Spheroid ¶
type Spheroid interface {
Inverse(a, b s2.LatLng) (s12, az1, az2 float64)
InverseBatch(points []s2.Point) float64
AreaAndPerimeter(points []s2.Point) (area float64, perimeter float64)
Project(point s2.LatLng, distance float64, azimuth s1.Angle) s2.LatLng
Radius() float64
Flattening() float64
SphereRadius() float64
}
Spheroid represents a spheroid object.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package embeddedproj defines the format used to embed static projection data in the Cockroach binary.
|
Package embeddedproj defines the format used to embed static projection data in the Cockroach binary. |