Geo

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Geo Geographic Conversion Tools Based on: http://www.cgms-info.org/documents/pdf_cgms_03.pdf

Index

Constants

This section is empty.

Variables

View Source
var MAXLAT = Deg2Rad(79)
View Source
var MAXLON = Deg2Rad(75)
View Source
var MINLAT = Deg2Rad(-79)
View Source
var MINLON = Deg2Rad(-75)

Functions

func Deg2Rad

func Deg2Rad(deg float64) float64

func LonLat2XY

func LonLat2XY(satLon, lon, lat float64, coff int, cfac float64, loff int, lfac float64) (c, l int)

func LonLat2XYf

func LonLat2XYf(satLon, lon, lat float64, coff int, cfac float64, loff int, lfac float64) (c, l float64)

func MakeGeoConverter

func MakeGeoConverter(satelliteLongitude float64, coff, loff int, cfac, lfac float64, fixAspect bool, imageWidth int) Projector.ProjectionConverter

MakeGeoConverter Creates a new instance of GeoConverter

satelliteLongitude => Satellite longitude.
coff => Column Offset
loff => Line Offset
cfac => Column Scaling Factor
lfac => Line Scaling Factor
fixAspect => If the aspect ratio should be fixed for cutting image
imageWidth => Image Width in pixels

func MakeGeoConverterFromXRIT

func MakeGeoConverterFromXRIT(xh *XRIT.Header) (Projector.ProjectionConverter, error)

MakeGeoConverterFromXRIT Creates a new instance of GeoConverter from a XRIT File Header

func MakeSimpleGeoConverter

func MakeSimpleGeoConverter(satelliteLongitude float64, coff, loff int, cfac, lfac float64) Projector.ProjectionConverter

MakeSimpleGeoConverter Creates a new instance of GeoConverter

Same as MakeGeoConverter but with fixAspect disabled and imageWidth = 0
satelliteLongitude => Satellite longitude.
coff => Column Offset
loff => Line Offset
cfac => Column Scaling Factor
lfac => Line Scaling Factor

func Rad2Deg

func Rad2Deg(rad float64) float64

func XY2LonLat

func XY2LonLat(satLon float64, c, l, coff int, cfac float64, loff int, lfac float64) (lat, lon float64)

Types

type Converter

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

func (*Converter) ColumnOffset

func (gc *Converter) ColumnOffset() int

ColumnOffset returns the number of pixels that the image is offset from left

func (*Converter) CropLeft

func (gc *Converter) CropLeft() int

CropLeft returns the number of pixels that should be cropped

func (*Converter) Hash

func (gc *Converter) Hash() string

func (*Converter) LatLon2XY

func (gc *Converter) LatLon2XY(lat, lon float64) (x, y int)

LatLon2XY Converts Latitude/Longitude to Pixel X/Y lat => Latitude in Degrees lon => Longitude in Degrees

func (*Converter) LatLon2XYf

func (gc *Converter) LatLon2XYf(lat, lon float64) (x, y float64)

LatLon2XYf Converts Latitude/Longitude to Pixel X/Y (float64) lat => Latitude in Degrees lon => Longitude in Degrees

func (*Converter) LatitudeCoverage

func (gc *Converter) LatitudeCoverage() float64

LatitudeCoverage returns Coverage of the view in Latitude Degrees

func (*Converter) LineOffset

func (gc *Converter) LineOffset() int

LineOffset returns the number of pixels that the image is offset from top

func (*Converter) LongitudeCoverage

func (gc *Converter) LongitudeCoverage() float64

LongitudeCoverage returns Coverage of the view in Longitude Degrees

func (*Converter) MaxLatitude

func (gc *Converter) MaxLatitude() float64

MaxLatitude returns the Maximum Visible Latitude

func (*Converter) MaxLongitude

func (gc *Converter) MaxLongitude() float64

MaxLongitude returns Maximum visible Longitude

func (*Converter) MinLatitude

func (gc *Converter) MinLatitude() float64

MinLatitude returns Minimum Visible Latitude

func (*Converter) MinLongitude

func (gc *Converter) MinLongitude() float64

MinLongitude returns Minimum visible latitude

func (*Converter) TrimLatitude

func (gc *Converter) TrimLatitude() float64

TrimLatitude returns Latitude Trim parameter for removing artifacts on Reprojection (in degrees)

func (*Converter) TrimLongitude

func (gc *Converter) TrimLongitude() float64

TrimLongitude returns Longitude Trim parameter for removing artifacts on Reprojection (in degrees)

func (*Converter) XY2LatLon

func (gc *Converter) XY2LatLon(x, y int) (lat, lon float64)

XY2LatLon Converts Pixel X/Y to Latitude/Longitude lat => Latitude in Degrees lon => Longitude in Degrees

Jump to

Keyboard shortcuts

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