Documentation ¶
Overview ¶
Geo Geographic Conversion Tools Based on: http://www.cgms-info.org/documents/pdf_cgms_03.pdf
Index ¶
- Variables
- func Deg2Rad(deg float64) float64
- func LonLat2XY(satLon, lon, lat float64, coff int, cfac float64, loff int, lfac float64) (c, l int)
- func LonLat2XYf(satLon, lon, lat float64, coff int, cfac float64, loff int, lfac float64) (c, l float64)
- func Rad2Deg(rad float64) float64
- func XY2LonLat(satLon float64, c, l, coff int, cfac float64, loff int, lfac float64) (lat, lon float64)
- type Converter
- func (gc *Converter) ColumnOffset() int
- func (gc *Converter) CropLeft() int
- func (gc *Converter) Hash() string
- func (gc *Converter) LatLon2XY(lat, lon float64) (x, y int)
- func (gc *Converter) LatLon2XYf(lat, lon float64) (x, y float64)
- func (gc *Converter) LatitudeCoverage() float64
- func (gc *Converter) LineOffset() int
- func (gc *Converter) LongitudeCoverage() float64
- func (gc *Converter) MaxLatitude() float64
- func (gc *Converter) MaxLongitude() float64
- func (gc *Converter) MinLatitude() float64
- func (gc *Converter) MinLongitude() float64
- func (gc *Converter) TrimLatitude() float64
- func (gc *Converter) TrimLongitude() float64
- func (gc *Converter) XY2LatLon(x, y int) (lat, lon float64)
Constants ¶
This section is empty.
Variables ¶
var MAXLAT = Deg2Rad(79)
var MAXLON = Deg2Rad(75)
var MINLAT = Deg2Rad(-79)
var MINLON = Deg2Rad(-75)
Functions ¶
func LonLat2XYf ¶
Types ¶
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
func MakeGeoConverter ¶
func MakeGeoConverter(satelliteLongitude float64, coff, loff int, cfac, lfac float64, fixAspect bool, imageWidth int) *Converter
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 ¶
MakeGeoConverterFromXRIT Creates a new instance of GeoConverter from a XRIT File Header
func MakeSimpleGeoConverter ¶
func MakeSimpleGeoConverter(satelliteLongitude float64, coff, loff int, cfac, lfac float64) *Converter
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 (*Converter) ColumnOffset ¶
ColumnOffset returns the number of pixels that the image is offset from left
func (*Converter) LatLon2XY ¶
LatLon2XY Converts Latitude/Longitude to Pixel X/Y lat => Latitude in Degrees lon => Longitude in Degrees
func (*Converter) LatLon2XYf ¶
LatLon2XYf Converts Latitude/Longitude to Pixel X/Y (float64) lat => Latitude in Degrees lon => Longitude in Degrees
func (*Converter) LatitudeCoverage ¶
LatitudeCoverage returns Coverage of the view in Latitude Degrees
func (*Converter) LineOffset ¶
LineOffset returns the number of pixels that the image is offset from top
func (*Converter) LongitudeCoverage ¶
LongitudeCoverage returns Coverage of the view in Longitude Degrees
func (*Converter) MaxLatitude ¶
MaxLatitude returns the Maximum Visible Latitude
func (*Converter) MaxLongitude ¶
MaxLongitude returns Maximum visible Longitude
func (*Converter) MinLatitude ¶
MinLatitude returns Minimum Visible Latitude
func (*Converter) MinLongitude ¶
MinLongitude returns Minimum visible latitude
func (*Converter) TrimLatitude ¶
TrimLatitude returns Latitude Trim parameter for removing artifacts on Reprojection (in degrees)
func (*Converter) TrimLongitude ¶
TrimLongitude returns Longitude Trim parameter for removing artifacts on Reprojection (in degrees)