geotiff

package
v0.0.0-...-d99e8d0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DT_Byte      = 1
	DT_ASCII     = 2
	DT_Short     = 3
	DT_Long      = 4
	DT_Rational  = 5
	DT_Sbyte     = 6
	DT_Undefined = 7
	DT_Sshort    = 8
	DT_Slong     = 9
	DT_Srational = 10
	DT_Float     = 11
	DT_Double    = 12
)

Data types (p. 14-16 of the spec).

View Source
const (
	PI_WhiteIsZero = 0
	PI_BlackIsZero = 1
	PI_RGB         = 2
	PI_Paletted    = 3
	PI_TransMask   = 4 // transparency mask
	PI_CMYK        = 5
	PI_YCbCr       = 6
	PI_CIELab      = 8
)

Photometric interpretation values (see p. 37 of the spec).

View Source
const (
	SF_UnsignedInteger = 1
	SF_SignedInteger   = 2
	SF_FloatingPoint   = 3
	SF_Uknown          = 4
)

Sample formats (page 80 of the spec).

Variables

View Source
var FileIsNotProperlyFormated = errors.New("The file does not appear to be properly formatted")

errors

View Source
var FileOpeningError = errors.New("An error occurred while opening the data file.")
View Source
var FileWritingError = errors.New("An error occurred while writing the data file.")

common errors

View Source
var TagNotFoundError = errors.New("Tag not found")
View Source
var UnsupportedDataTypeError = errors.New("Unsupported data type")

Functions

This section is empty.

Types

type GeoTIFF

type GeoTIFF struct {
	ByteOrder  binary.ByteOrder
	NumGeoKeys int

	Rows          uint
	Columns       uint
	Data          []float64
	BitsPerSample []uint

	SampleFormat      uint
	PhotometricInterp uint

	TiepointData      TiepointTransformationParameters
	NodataValue       string
	RasterPixelIsArea bool
	EPSGCode          uint
	// contains filtered or unexported fields
}

func (*GeoTIFF) FindIFDEntryFromCode

func (g *GeoTIFF) FindIFDEntryFromCode(tagCode int) (*IfdEntry, error)

func (*GeoTIFF) FindIFDEntryFromName

func (g *GeoTIFF) FindIFDEntryFromName(tagName string) (*IfdEntry, error)

func (*GeoTIFF) GetTags

func (g *GeoTIFF) GetTags() (ret string)

func (*GeoTIFF) Read

func (g *GeoTIFF) Read(fileName string) (err error)

func (*GeoTIFF) Write

func (g *GeoTIFF) Write(fileName string) (err error)

type GeoTiffTag

type GeoTiffTag struct {
	Name string
	Code int
}

func (GeoTiffTag) String

func (g GeoTiffTag) String() string

type GeotiffDataType

type GeotiffDataType int

func (GeotiffDataType) GetBitLength

func (g GeotiffDataType) GetBitLength() uint32

func (GeotiffDataType) String

func (g GeotiffDataType) String() string

String returns the English name of the DataType ("Byte", "ASCII", ...).

type IfdEntry

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

func CreateIfdEntry

func CreateIfdEntry(code int, dataType GeotiffDataType, count uint32, data interface{}, byteOrder binary.ByteOrder) IfdEntry

func (*IfdEntry) AddData

func (ifd *IfdEntry) AddData(data []byte)

func (*IfdEntry) InterpretDataAsASCII

func (ifd *IfdEntry) InterpretDataAsASCII() (u []string, err error)

ifdFloat decodes the IFD entry in p, which must be of the ASCII type, and returns the decoded uint values.

func (*IfdEntry) InterpretDataAsFloat

func (ifd *IfdEntry) InterpretDataAsFloat() (u []float64, err error)

func (*IfdEntry) InterpretDataAsInt

func (ifd *IfdEntry) InterpretDataAsInt() (u []uint, err error)

func (*IfdEntry) InterpretDataAsRational

func (ifd *IfdEntry) InterpretDataAsRational() (u []float64, err error)

func (IfdEntry) String

func (ifd IfdEntry) String() string

type TiepointTransformationParameters

type TiepointTransformationParameters struct {
	I, J, K, X, Y, Z       float64
	ScaleX, ScaleY, ScaleZ float64
}

Directories

Path Synopsis
Package lzw implements the Lempel-Ziv-Welch compressed data format, described in T. A. Welch, “A Technique for High-Performance Data Compression”, Computer, 17(6) (June 1984), pp 8-19.
Package lzw implements the Lempel-Ziv-Welch compressed data format, described in T. A. Welch, “A Technique for High-Performance Data Compression”, Computer, 17(6) (June 1984), pp 8-19.

Jump to

Keyboard shortcuts

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