geoprojbase

package
v0.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

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

View Source
var Projections = map[geopb.SRID]ProjInfo{}/* 6139 elements not displayed */

Projections is a mapping of SRID to projections. Use the `Projection` function to obtain one. This file is not spell checked.

Functions

This section is empty.

Types

type Bounds

type Bounds struct {
	MinX float64
	MaxX float64
	MinY float64
	MaxY float64
}

Bounds represents the projected or lat/lng bounds.

type Proj4Text

type Proj4Text struct {
	// contains filtered or unexported fields
}

Proj4Text is the text representation of a PROJ4 transformation.

func MakeProj4Text

func MakeProj4Text(str string) Proj4Text

MakeProj4Text returns a new Proj4Text with spec based on the given string.

func (*Proj4Text) Bytes

func (p *Proj4Text) Bytes() []byte

Bytes returns the raw bytes for the given proj text.

func (*Proj4Text) Equal

func (p *Proj4Text) Equal(o Proj4Text) bool

Equal returns whether the two Proj4Texts are equal.

func (*Proj4Text) String

func (p *Proj4Text) String() string

String returns the string representation of the given proj text.

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 *geographiclib.Spheroid
}

ProjInfo is a struct containing metadata related to a given SRID.

func Projection

func Projection(srid geopb.SRID) (ProjInfo, bool)

Projection returns the ProjInfo identifier for the given SRID, as well as an bool indicating whether the projection exists.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL