Documentation
¶
Overview ¶
Package raster provides support for reading and creating various common geospatial raster data formats.
Package raster provides support for reading and creating various common geospatial raster data formats.
Package raster provides support for reading and creating various common geospatial raster data formats.
Package raster provides support for reading and creating various common geospatial raster data formats.
Package raster provides support for reading and creating various common geospatial raster data formats.
Package raster provides support for reading and creating various common geospatial raster data formats.
Package raster provides support for reading and creating various common geospatial raster data formats.
Package raster provides support for reading and creating various common geospatial raster data formats.
Index ¶
- Constants
- Variables
- func GetMapOfFormatsAndExtensions() map[string][]string
- func IsSupportedRasterFileExtension(fileName string) (ret bool)
- func ListAllSupportedRasterFormats() []string
- type Raster
- func (r *Raster) AddMetadataEntry(value string)
- func (r *Raster) Data() ([]float64, error)
- func (r *Raster) GetCellSizeX() (cellSizeX float64)
- func (r *Raster) GetCellSizeY() (cellSizeY float64)
- func (r *Raster) GetMaximumValue() float64
- func (r *Raster) GetMetadataEntries() []string
- func (r *Raster) GetMinimumValue() float64
- func (r *Raster) GetRasterConfig() *RasterConfig
- func (r *Raster) IsInGeographicCoordinates() bool
- func (r *Raster) Save() (err error)
- func (r *Raster) SetData(values []float64)
- func (r *Raster) SetDisplayMaximum(value float64)
- func (r *Raster) SetDisplayMinimum(value float64)
- func (r *Raster) SetRasterConfig(value *RasterConfig)
- func (r *Raster) SetRowValues(row int, values []float64)
- func (r *Raster) SetValue(row, column int, value float64)
- func (r *Raster) Value(row, column int) float64
- type RasterConfig
- type RasterType
Constants ¶
const ( DT_INT8 = iota DT_UINT8 DT_INT16 DT_UINT16 DT_INT32 DT_UINT32 DT_INT64 DT_UINT64 DT_FLOAT32 DT_FLOAT64 DT_RGB24 DT_RGB48 DT_RGBA32 DT_RGBA64 DT_PALETTED )
Data Type
Variables ¶
var DataSetError = errors.New("An error occurred while setting the data.")
var FileDeletingError = errors.New("There were problems deleting the file.")
var FileDoesNotExistError = errors.New("The file does not exist.")
var FileIsNotProperlyFormated = errors.New("The file does not appear to be properly formated")
var FileOpeningError = errors.New("An error occurred while opening the data file.")
var FileReadingError = errors.New("An error occurred while reading the data file.")
var FileWritingError = errors.New("An error occurred while writing the data file.")
var MultipleRasterFormatError = errors.New("There are multiple possible raster formats for this file.")
var RasterInitializationError = errors.New("An error occurred while initializing the raster.")
var UnsupportedRasterFormatError = errors.New("Unsupported raster format.")
Functions ¶
func ListAllSupportedRasterFormats ¶
func ListAllSupportedRasterFormats() []string
String returns the English name of the RasterType ("ArcGisBinaryRaster", "ArcGisAsciiRaster", ...).
Types ¶
type Raster ¶
type Raster struct {
Rows, Columns int
NumberofCells int
North, South, East, West float64
NoDataValue float64
FileName string
FileExtension string
RasterFormat RasterType
ByteOrder binary.ByteOrder
// contains filtered or unexported fields
}
func CreateNewRaster ¶
func CreateRasterFromFile ¶
func CreateRasterFromFile(fileName string, config ...RasterConfig) (*Raster, error)
func (*Raster) AddMetadataEntry ¶
func (*Raster) GetCellSizeX ¶
func (*Raster) GetCellSizeY ¶
func (*Raster) GetMaximumValue ¶
func (*Raster) GetMetadataEntries ¶
func (*Raster) GetMinimumValue ¶
func (*Raster) GetRasterConfig ¶
func (r *Raster) GetRasterConfig() *RasterConfig
Gets the raster config
func (*Raster) IsInGeographicCoordinates ¶
func (*Raster) SetDisplayMaximum ¶
func (*Raster) SetDisplayMinimum ¶
func (*Raster) SetRasterConfig ¶
func (r *Raster) SetRasterConfig(value *RasterConfig)
Sets the raster config
func (*Raster) SetRowValues ¶
Sets an a row of pixel value in the grid.
type RasterConfig ¶
type RasterConfig struct { NoDataValue float64 InitialValue float64 RasterFormat RasterType ByteOrder binary.ByteOrder MetadataEntries []string CoordinateRefSystemWKT string NumberOfBands int PhotometricInterpretation int DataType int PaletteNonlinearity float64 ZUnits string XYUnits string PreferredPalette string DisplayMinimum float64 DisplayMaximum float64 ReflectAtBoundaries bool PixelIsArea bool EPSGCode int }
func NewDefaultRasterConfig ¶
func NewDefaultRasterConfig() *RasterConfig
func (RasterConfig) String ¶
func (h RasterConfig) String() string
type RasterType ¶
type RasterType int
RasterType is used to specify a data format of a raster file
const ( RT_UnknownRaster RasterType = 0 RT_ArcGisBinaryRaster RasterType = iota RT_ArcGisAsciiRaster RT_GeoTiff RT_WhiteboxRaster RT_GrassAsciiRaster RT_SurferAsciiRaster RT_SagaRaster RT_IdrisiRaster )
Integer constants used to specify each of the supported raster formats
func DetermineRasterFormat ¶
func DetermineRasterFormat(fileName string) (rt RasterType, err error)
Attempts to determine the raster format from the filename.
func (RasterType) GetExtensions ¶
func (rt RasterType) GetExtensions() []string
Returns a list of the file extensions associated with a particular raster format.
func (RasterType) String ¶
func (rt RasterType) String() string
String returns the English name of the RasterType ("ArcGisBinaryRaster", "ArcGisAsciiRaster", ...).
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
lzw
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. |