Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Latitude_Band_Table = [20]Latitude_Band{
{letterC, 1100000.0, -72.0, -80.5, 0.0},
{letterD, 2000000.0, -64.0, -72.0, 2000000.0},
{letterE, 2800000.0, -56.0, -64.0, 2000000.0},
{letterF, 3700000.0, -48.0, -56.0, 2000000.0},
{letterG, 4600000.0, -40.0, -48.0, 4000000.0},
{letterH, 5500000.0, -32.0, -40.0, 4000000.0},
{letterJ, 6400000.0, -24.0, -32.0, 6000000.0},
{letterK, 7300000.0, -16.0, -24.0, 6000000.0},
{letterL, 8200000.0, -8.0, -16.0, 8000000.0},
{letterM, 9100000.0, 0.0, -8.0, 8000000.0},
{letterN, 0.0, 8.0, 0.0, 0.0},
{letterP, 800000.0, 16.0, 8.0, 0.0},
{letterQ, 1700000.0, 24.0, 16.0, 0.0},
{letterR, 2600000.0, 32.0, 24.0, 2000000.0},
{letterS, 3500000.0, 40.0, 32.0, 2000000.0},
{letterT, 4400000.0, 48.0, 40.0, 4000000.0},
{letterU, 5300000.0, 56.0, 48.0, 4000000.0},
{letterV, 6200000.0, 64.0, 56.0, 6000000.0},
{letterW, 7000000.0, 72.0, 64.0, 6000000.0},
{letterX, 7900000.0, 84.5, 72.0, 6000000.0}}
Functions ¶
This section is empty.
Types ¶
type CoordinateSystem ¶
type CoordinateSystem struct {
// contains filtered or unexported fields
}
type Hemisphere ¶
type Hemisphere byte
const ( HemisphereInvalid Hemisphere = iota HemisphereNorth HemisphereSouth )
type Latitude_Band ¶
type Latitude_Band struct {
// contains filtered or unexported fields
}
type MGRS ¶
type MGRS struct {
CoordinateSystem
MGRSEllipsoidCode string
// contains filtered or unexported fields
}
MGRS is an coordinate converter to and from MGRS coordinates.
var DefaultMGRSConverter *MGRS
DefaultMGRSConverter is a WGS84 ellipsoid based MGRS converter.
func NewMGRS ¶
func NewMGRS(ellipsoidSemiMajorAxis, ellipsoidFlattening float64, ellipsoidCode string) (*MGRS, error)
NewMGRS constructs an MGRS converter with ellipsoid parameters.
func (*MGRS) ConvertFromGeodetic ¶
ConvertFromGeodetic converts Geodetic (latitude and longitude) coordinates to an MGRS coordinate string, according to the current ellipsoid parameters.
func (*MGRS) ConvertFromUTM ¶
ConvertFromUTM converts UTM (zone, easting, and northing) coordinates to an MGRS coordinate string, according to the current ellipsoid parameters. If any errors occur, an exception is thrown with a description of the error.
type PolarStereographic ¶
type PolarStereographic struct {
CoordinateSystem
// contains filtered or unexported fields
}
func MakePolarStereographic1 ¶
func MakePolarStereographic1(ellipsoidSemiMajorAxis, ellipsoidFlattening, centralMeridian, standardParallel, falseEasting, falseNorthing float64) (*PolarStereographic, error)
MakePolarStereographic1 receives the ellipsoid parameters and Polar Stereograpic (Standard Parallel) projection parameters as inputs, and sets the corresponding state variables.
func MakePolarStereographicScaleFactor ¶
func MakePolarStereographicScaleFactor(ellipsoidSemiMajorAxis, ellipsoidFlattening, centralMeridian, scaleFactor float64, hemisphere Hemisphere, falseEasting, falseNorthing float64) (*PolarStereographic, error)
MakePolarStereographicScaleFactor ellipsoid parameters and Polar Stereograpic (Scale Factor) projection parameters as inputs, and sets the corresponding state variables.
func (*PolarStereographic) ConvertFromGeodetic ¶
func (p *PolarStereographic) ConvertFromGeodetic(geodeticCoordinates s2.LatLng) (MapCoords, error)
ConvertFromGeodetic converts geodetic coordinates (latitude and longitude) to Polar Stereographic coordinates (easting and northing), according to the current ellipsoid and Polar Stereographic projection parameters.
func (*PolarStereographic) ConvertToGeodetic ¶
func (p *PolarStereographic) ConvertToGeodetic(mapProjectionCoordinates MapCoords) (s2.LatLng, error)
ConvertToGeodetic converts Polar Stereographic coordinates (easting and northing) to geodetic coordinates (latitude and longitude) according to the current ellipsoid and Polar Stereographic projection Parameters.
type TransverseMercator ¶
type TransverseMercator struct {
CoordinateSystem
TranMercFalseNorthing float64 // False northing in meters
// contains filtered or unexported fields
}
func NewTransverseMercator ¶
func NewTransverseMercator(ellipsoidSemiMajorAxis, ellipsoidFlattening, centralMeridian, latitudeOfTrueScale, falseEasting, falseNorthing, scaleFactor float64, ellipsoidCode string) (*TransverseMercator, error)
type UPS ¶
type UPS struct {
CoordinateSystem
UPSOriginLatitude float64
// contains filtered or unexported fields
}
UPS is a UPS coordinate converter
var DefaultUPSConverter *UPS
DefaultUPSConverter is a WGS84 ellipsoid based UPS converter.
func (*UPS) ConvertFromGeodetic ¶
ConvertFromGeodetic converts a geodetic coordinate to a UPS coordinate.
type UPSCoord ¶
type UPSCoord struct {
Hemisphere Hemisphere
Easting float64
Northing float64
}
UPSCoord is a UPS coordinate with a specified easting/northing in meters and hemisphere.
type UTM ¶
type UTM struct {
CoordinateSystem
// contains filtered or unexported fields
}
UTM is a UTM coordinate converter
var DefaultUTMConverter *UTM
DefaultUTMConverter is a WGS84 ellipsoid based UTM converter.
func NewUTM2 ¶
func NewUTM2(ellipsoidSemiMajorAxis, ellipsoidFlattening float64, ellipsoidCode string, override int) (*UTM, error)
NewUTM2 receives the ellipsoid parameters and UTM zone override parameter as inputs, and sets the corresponding state variables. override is the UTM override zone, 0 indicates no override.
func (*UTM) ConvertFromGeodetic ¶
func (u *UTM) ConvertFromGeodetic(geodeticCoordinates s2.LatLng, utmZoneOverride int) (UTMCoord, error)
ConvertFromGeodetic converts geodetic (latitude and longitude) coordinates to UTM projection (zone, hemisphere, easting and northing) coordinates according to the current ellipsoid and UTM zone override parameters.