Documentation
¶
Overview ¶
Package gdal provides a wrapper for GDAL, the Geospatial Data Abstraction Library. This C/C++ library provides access to a large number of geospatial raster data formats. It also contains a wrapper for the related OGR Simple Feature Library which provides similar functionality for vector formats.
Limitations ¶
Some less oftenly used functions are not yet implemented. The majoriry of these involve style tables, asynchronous I/O, and GCPs.
The documentation is fairly limited, but the functionality fairly closely matches that of the C++ api.
This wrapper has most recently been tested on Windows7, using the MinGW32_x64 compiler and GDAL version 1.11.
Usage ¶
A simple program to create a georeferenced blank 256x256 GeoTIFF:
package main import ( "fmt" "flag" gdal "github/com/Ginger955/gdal " ) func main() { flag.Parse() filename := flag.Arg(0) if filename == "" { fmt.Printf("Usage: tiff [filename]\n") return } buffer := make([]uint8, 256 * 256) driver, err := gdal.GetDriverByName("GTiff") if err != nil { fmt.Println(err.Error()) return } dataset := driver.Create(filename, 256, 256, 1, gdal.Byte, nil) defer dataset.Close() spatialRef := gdal.CreateSpatialReference("") spatialRef.FromEPSG(3857) srString, err := spatialRef.ToWKT() dataset.SetProjection(srString) dataset.SetGeoTransform([]float64{444720, 30, 0, 3751320, 0, -30}) raster := dataset.RasterBand(1) raster.IO(gdal.Write, 0, 0, 256, 256, buffer, 256, 256, 0, 0) }
More examples can be found in the ./examples subdirectory.
Index ¶
- Constants
- Variables
- func BoolToCInt(in bool) (out C.int)
- func CIntSliceToInt(data []C.int) []int
- func CPLGetConfigOption(key, val string) string
- func CPLSetConfigOption(key, val string)
- func CUIntBigSliceToInt(data []C.GUIntBig) []int
- func CleanupOGR()
- func CleanupSR()
- func ComputeMedianCutPCT(red, green, blue RasterBand, colors int, ct ColorTable, progress ProgressFunc, ...) int
- func CreateScaledProgress(min, max float64, progress ProgressFunc, data unsafe.Pointer) unsafe.Pointer
- func DestroyDriverManager()
- func DestroyScaledProgress(data unsafe.Pointer)
- func DitherRGB2PCT(red, green, blue, target RasterBand, ct ColorTable, progress ProgressFunc, ...) int
- func DummyProgress(complete float64, message string, data interface{}) int
- func FlushCacheBlock() bool
- func GetCacheMax() int
- func GetCacheUsed() int
- func GetDriverCount() int
- func GridCreate(algorithm GridAlgorithm, options interface{}, x, y, z []float64, ...) ([]float64, error)
- func Info(sourceDS Dataset, options []string) string
- func IntSliceToCInt(data []int) []C.int
- func InvGeoTransform(transform [6]float64) [6]float64
- func OGRDriverCount() int
- func OpenDataSourceCount() int
- func ReprojectImage(srcDs, destDs Dataset, srcWkt, destWkt string, alg ResampleAlg, ...) error
- func ScaledProgress(complete float64, message string, data interface{}) int
- func SetCacheMax(bytes int)
- func TermProgress(complete float64, message string, data interface{}) int
- func VSIFCloseL(file VSILFILE)
- func VSIFReadL(nSize, nCount int, file VSILFILE) []byte
- func VSIReadDirRecursive(filename string) []string
- type Access
- type AsyncReader
- type AsyncStatusType
- type AxisMappingStrategy
- type CPLErr
- type CPLErrContainer
- type ColorEntry
- type ColorInterp
- type ColorTable
- func (ct ColorTable) Clone() ColorTable
- func (ct ColorTable) CreateColorRamp(start, end int, startColor, endColor ColorEntry)
- func (ct ColorTable) Destroy()
- func (ct ColorTable) Entry(index int) ColorEntry
- func (ct ColorTable) EntryCount() int
- func (ct ColorTable) PaletteInterpretation() PaletteInterp
- func (ct ColorTable) SetEntry(index int, entry ColorEntry)
- type CoordinateTransform
- type DataSource
- func (ds DataSource) CopyLayer(source Layer, name string, options []string) Layer
- func (ds DataSource) CreateLayer(name string, sr SpatialReference, geomType GeometryType, options []string) Layer
- func (ds DataSource) Delete(index int) error
- func (ds DataSource) Destroy()
- func (ds DataSource) Driver() OGRDriver
- func (ds DataSource) ExecuteSQL(sql string, filter Geometry, dialect string) Layer
- func (ds DataSource) LayerByIndex(index int) Layer
- func (ds DataSource) LayerByName(name string) Layer
- func (ds DataSource) LayerCount() int
- func (ds DataSource) Name() string
- func (ds DataSource) Release() error
- func (ds DataSource) ReleaseResultSet(layer Layer)
- func (ds DataSource) Sync() error
- func (ds DataSource) TestCapability(capability string) bool
- type DataType
- type Dataset
- func BuildVRT(dstDS string, sourceDS []Dataset, srcDSFilePath, options []string) (Dataset, error)
- func DEMProcessing(dstDS string, sourceDS Dataset, processing string, colorFileName string, ...) (Dataset, error)
- func Open(filename string, access Access) (Dataset, error)
- func OpenEx(filename string, flags OpenFlag, allowedDrivers []string, openOptions []string, ...) (Dataset, error)
- func OpenShared(filename string, access Access) Dataset
- func Rasterize(dstDS string, sourceDS Dataset, options []string) (Dataset, error)
- func Translate(dstDS string, sourceDS Dataset, options []string) (Dataset, error)
- func VectorTranslate(dstDS string, sourceDS []Dataset, options []string) (Dataset, error)
- func Warp(dstDS string, destDS *Dataset, sourceDS []Dataset, options []string) (Dataset, error)
- func (dataset Dataset) Access() Access
- func (dataset Dataset) AddBand(dataType DataType, options []string) error
- func (dataset Dataset) AdviseRead(rwFlag RWFlag, xOff, yOff, xSize, ySize, bufXSize, bufYSize int, ...) error
- func (dataset Dataset) AutoCreateWarpedVRT(srcWKT, dstWKT string, resampleAlg ResampleAlg) (Dataset, error)
- func (dataset Dataset) BuildOverviews(resampling string, nOverviews int, overviewList []int, nBands int, ...) error
- func (dataset Dataset) Close()
- func (sourceDataset Dataset) CopyWholeRaster(destDataset Dataset, options []string, progress ProgressFunc, data interface{}) error
- func (dataset Dataset) CreateMaskBand(flags int) error
- func (dataset Dataset) Driver() Driver
- func (dataset Dataset) FileList() []string
- func (dataset Dataset) FlushCache()
- func (dataset Dataset) GDALDereferenceDataset() int
- func (dataset Dataset) GDALGetGCPCount() int
- func (dataset Dataset) GDALGetGCPProjection() string
- func (dataset Dataset) GDALGetInternalHandle(request string) unsafe.Pointer
- func (dataset Dataset) GDALReferenceDataset() int
- func (dataset Dataset) GeoTransform() [6]float64
- func (dataset Dataset) IO(rwFlag RWFlag, xOff, yOff, xSize, ySize int, buffer interface{}, ...) error
- func (dataset Dataset) InvGeoTransform() [6]float64
- func (dataset *Dataset) Metadata(domain string) []string
- func (object *Dataset) MetadataItem(name, domain string) string
- func (dataset Dataset) Projection() string
- func (dataset Dataset) RasterBand(band int) RasterBand
- func (dataset Dataset) RasterCount() int
- func (dataset Dataset) RasterXSize() int
- func (dataset Dataset) RasterYSize() int
- func (dataset Dataset) SetGeoTransform(transform [6]float64) error
- func (object *Dataset) SetMetadataItem(name, value, domain string) error
- func (dataset Dataset) SetProjection(proj string) error
- type Driver
- func (driver Driver) CopyDatasetFiles(newName, oldName string) error
- func (driver Driver) Create(filename string, xSize, ySize, bands int, dataType DataType, options []string) Dataset
- func (driver Driver) CreateCopy(filename string, sourceDataset Dataset, strict int, options []string, ...) Dataset
- func (driver Driver) DeleteDataset(name string) error
- func (driver Driver) Deregister()
- func (driver Driver) Destroy()
- func (driver Driver) LongName() string
- func (object *Driver) MetadataItem(name, domain string) string
- func (driver Driver) Register() int
- func (driver Driver) RenameDataset(newName, oldName string) error
- func (driver Driver) ShortName() string
- type Envelope
- func (env Envelope) Contains(other Envelope) bool
- func (env Envelope) Intersect(other Envelope) Envelope
- func (env Envelope) Intersects(other Envelope) bool
- func (env Envelope) IsInit() bool
- func (env Envelope) MaxX() float64
- func (env Envelope) MaxY() float64
- func (env Envelope) MinX() float64
- func (env Envelope) MinY() float64
- func (env *Envelope) SetMaxX(val float64)
- func (env *Envelope) SetMaxY(val float64)
- func (env *Envelope) SetMinX(val float64)
- func (env *Envelope) SetMinY(val float64)
- func (env Envelope) Union(other Envelope) Envelope
- type Envelope3D
- func (env Envelope3D) Contains(other Envelope3D) bool
- func (env Envelope3D) Intersect(other Envelope3D) Envelope3D
- func (env Envelope3D) Intersects(other Envelope3D) bool
- func (env Envelope3D) IsInit() bool
- func (env Envelope3D) MaxX() float64
- func (env Envelope3D) MaxY() float64
- func (env Envelope3D) MaxZ() float64
- func (env Envelope3D) MinX() float64
- func (env Envelope3D) MinY() float64
- func (env Envelope3D) MinZ() float64
- func (env *Envelope3D) SetMaxX(val float64)
- func (env *Envelope3D) SetMaxY(val float64)
- func (env *Envelope3D) SetMaxZ(val float64)
- func (env *Envelope3D) SetMinX(val float64)
- func (env *Envelope3D) SetMinY(val float64)
- func (env *Envelope3D) SetMinZ(val float64)
- func (env Envelope3D) Union(other Envelope3D) Envelope3D
- type Feature
- func (feature Feature) Clone() Feature
- func (feature Feature) Definition() FeatureDefinition
- func (feature Feature) Destroy()
- func (f1 Feature) Equal(f2 Feature) bool
- func (feature Feature) FID() int64
- func (feature Feature) FieldAsBinary(index int) []uint8
- func (feature Feature) FieldAsDateTime(index int) (time.Time, bool)
- func (feature Feature) FieldAsFloat64(index int) float64
- func (feature Feature) FieldAsFloat64List(index int) []float64
- func (feature Feature) FieldAsInteger(index int) int
- func (feature Feature) FieldAsInteger64(index int) int64
- func (feature Feature) FieldAsInteger64List(index int) []int64
- func (feature Feature) FieldAsIntegerList(index int) []int
- func (feature Feature) FieldAsString(index int) string
- func (feature Feature) FieldAsStringList(index int) []string
- func (feature Feature) FieldCount() int
- func (feature Feature) FieldDefinition(index int) FieldDefinition
- func (feature Feature) FieldIndex(name string) int
- func (feature Feature) Geometry() Geometry
- func (feature Feature) IsFieldSet(index int) bool
- func (feature Feature) IsFieldSetAndNotNull(index int) bool
- func (feature Feature) IsNull() bool
- func (feature Feature) RawField(index int) Field
- func (feature Feature) SetFID(fid int64) error
- func (feature Feature) SetFieldBinary(index int, value []uint8)
- func (feature Feature) SetFieldDateTime(index int, dt time.Time)
- func (feature Feature) SetFieldFloat64(index int, value float64)
- func (feature Feature) SetFieldFloat64List(index int, value []float64)
- func (feature Feature) SetFieldInteger(index, value int)
- func (feature Feature) SetFieldInteger64(index int, value int64)
- func (feature Feature) SetFieldInteger64List(index int, value []int64)
- func (feature Feature) SetFieldIntegerList(index int, value []int)
- func (feature Feature) SetFieldRaw(index int, field Field)
- func (feature Feature) SetFieldString(index int, value string)
- func (feature Feature) SetFieldStringList(index int, value []string)
- func (this Feature) SetFrom(other Feature, forgiving int) error
- func (this Feature) SetFromWithMap(other Feature, forgiving int, fieldMap []int) error
- func (feature Feature) SetGeometry(geom Geometry) error
- func (feature Feature) SetGeometryDirectly(geom Geometry) error
- func (feature Feature) SetStyleString(style string)
- func (feature Feature) StealGeometry() Geometry
- func (feature Feature) StlyeString() string
- func (feature Feature) UnnsetField(index int)
- type FeatureDefinition
- func (fd FeatureDefinition) AddFieldDefinition(fieldDefn FieldDefinition)
- func (fd FeatureDefinition) Create() Feature
- func (fd FeatureDefinition) DeleteFieldDefinition(index int) error
- func (fd FeatureDefinition) Dereference() int
- func (fd FeatureDefinition) Destroy()
- func (fd FeatureDefinition) FieldCount() int
- func (fd FeatureDefinition) FieldDefinition(index int) FieldDefinition
- func (fd FeatureDefinition) FieldIndex(name string) int
- func (fd FeatureDefinition) GeometryType() GeometryType
- func (fd FeatureDefinition) IsGeometryIgnored() bool
- func (fd FeatureDefinition) IsStyleIgnored() bool
- func (fd FeatureDefinition) Name() string
- func (fd FeatureDefinition) Reference() int
- func (fd FeatureDefinition) ReferenceCount() int
- func (fd FeatureDefinition) Release()
- func (fd FeatureDefinition) SetGeometryIgnored(val bool)
- func (fd FeatureDefinition) SetGeometryType(geomType GeometryType)
- func (fd FeatureDefinition) SetStyleIgnored(val bool)
- type Field
- type FieldDefinition
- func (fd FieldDefinition) AlternativeName() string
- func (fd FieldDefinition) Destroy()
- func (fd FieldDefinition) IsIgnored() bool
- func (fd FieldDefinition) Justification() Justification
- func (fd FieldDefinition) Name() string
- func (fd FieldDefinition) Precision() int
- func (fd FieldDefinition) Set(name string, fType FieldType, width, precision int, justify Justification)
- func (fd FieldDefinition) SetAlternateName(name string)
- func (fd FieldDefinition) SetIgnored(ignore bool)
- func (fd FieldDefinition) SetJustification(justify Justification)
- func (fd FieldDefinition) SetName(name string)
- func (fd FieldDefinition) SetPrecision(precision int)
- func (fd FieldDefinition) SetType(fType FieldType)
- func (fd FieldDefinition) SetWidth(width int)
- func (fd FieldDefinition) Type() FieldType
- func (fd FieldDefinition) Width() int
- type FieldType
- type Geometry
- func ApproximateArcAngles(...) Geometry
- func Create(geomType GeometryType) Geometry
- func CreateFromGML(gml string) Geometry
- func CreateFromJson(_json string) Geometry
- func CreateFromWKB(wkb []uint8, srs SpatialReference, bytes int) (Geometry, error)
- func CreateFromWKT(wkt string, srs SpatialReference) (Geometry, error)
- func (geom Geometry) AddGeometry(other Geometry) error
- func (geom Geometry) AddGeometryDirectly(other Geometry) error
- func (geom Geometry) AddPoint(x, y, z float64)
- func (geom Geometry) AddPoint2D(x, y float64)
- func (geom Geometry) Area() float64
- func (geom Geometry) Boundary() Geometry
- func (geom Geometry) Buffer(distance float64, segments int) Geometry
- func (geom Geometry) BuildPolygonFromEdges(autoClose bool, tolerance float64) (Geometry, error)
- func (geom Geometry) Centroid() Geometry
- func (geom Geometry) Clone() Geometry
- func (geom Geometry) CloseRings()
- func (geom Geometry) Contains(other Geometry) bool
- func (geom Geometry) ConvexHull() Geometry
- func (geom Geometry) CoordinateDimension() int
- func (geom Geometry) Crosses(other Geometry) bool
- func (geometry Geometry) Destroy()
- func (geom Geometry) Difference(other Geometry) Geometry
- func (geom Geometry) Dimension() int
- func (geom Geometry) Disjoint(other Geometry) bool
- func (geom Geometry) Distance(other Geometry) float64
- func (geom Geometry) Distance3D(other Geometry) float64
- func (geom Geometry) Empty()
- func (geom Geometry) Envelope() Envelope
- func (geom Geometry) Envelope3D() Envelope3D
- func (geom Geometry) Equals(other Geometry) bool
- func (geom Geometry) FlattenTo2D()
- func (geom Geometry) ForceToMultiLineString() Geometry
- func (geom Geometry) ForceToMultiPoint() Geometry
- func (geom Geometry) ForceToMultiPolygon() Geometry
- func (geom Geometry) ForceToPolygon() Geometry
- func (geom Geometry) FromWKB(wkb []uint8, bytes int) error
- func (geom Geometry) FromWKT(wkt string) error
- func (geom Geometry) Geometry(index int) Geometry
- func (geom Geometry) GeometryCount() int
- func (geom Geometry) Intersection(other Geometry) Geometry
- func (geom Geometry) Intersects(other Geometry) bool
- func (geom Geometry) IsEmpty() bool
- func (geom Geometry) IsNull() bool
- func (geom Geometry) IsRing() bool
- func (geom Geometry) IsSimple() bool
- func (geom Geometry) IsValid() bool
- func (geom Geometry) Length() float64
- func (geom Geometry) Name() string
- func (geom Geometry) Overlaps(other Geometry) bool
- func (geom Geometry) Point(index int) (x, y, z float64)
- func (geom Geometry) PointCount() int
- func (geom Geometry) Polygonize() Geometry
- func (geom Geometry) RemoveGeometry(index int, delete bool) error
- func (geom Geometry) Segmentize(distance float64)
- func (geom Geometry) SetCoordinateDimension(dim int)
- func (geom Geometry) SetPoint(index int, x, y, z float64)
- func (geom Geometry) SetPoint2D(index int, x, y float64)
- func (geom Geometry) SetSpatialReference(spatialRef SpatialReference)
- func (geom Geometry) Simplify(tolerance float64) Geometry
- func (geom Geometry) SimplifyPreservingTopology(tolerance float64) Geometry
- func (geom Geometry) SpatialReference() SpatialReference
- func (geom Geometry) SymmetricDifference(other Geometry) Geometry
- func (geom Geometry) ToGML() string
- func (geom Geometry) ToGML_Ex(options []string) string
- func (geom Geometry) ToJSON() string
- func (geom Geometry) ToJSON_ex(options []string) string
- func (geom Geometry) ToKML() string
- func (geom Geometry) ToWKB() ([]uint8, error)
- func (geom Geometry) ToWKT() (string, error)
- func (geom Geometry) Touches(other Geometry) bool
- func (geom Geometry) Transform(ct CoordinateTransform) error
- func (geom Geometry) TransformTo(sr SpatialReference) error
- func (geom Geometry) Type() GeometryType
- func (geom Geometry) Union(other Geometry) Geometry
- func (geom Geometry) UnionCascaded() Geometry
- func (geom Geometry) WKBSize() int
- func (geom Geometry) Within(other Geometry) bool
- func (geom Geometry) X(index int) float64
- func (geom Geometry) Y(index int) float64
- func (geom Geometry) Z(index int) float64
- type GeometryType
- type GridAlgorithm
- type GridDataMetricsOptions
- type GridInverseDistanceToAPowerNearestNeighborOptions
- type GridInverseDistanceToAPowerOptions
- type GridLinearOptions
- type GridMovingAverageOptions
- type GridNearestNeighborOptions
- type Justification
- type Layer
- func (layer Layer) AlterFieldDefn(index int, newDefn FieldDefinition, flags int) error
- func (layer Layer) CommitTransaction() error
- func (layer Layer) Create(feature Feature) error
- func (layer Layer) CreateField(fd FieldDefinition, approxOK bool) error
- func (layer Layer) Definition() FeatureDefinition
- func (layer Layer) Delete(index int64) error
- func (layer Layer) DeleteField(index int) error
- func (layer Layer) Extent(force bool) (env Envelope, err error)
- func (layer Layer) FIDColumn() string
- func (layer Layer) Feature(index int64) Feature
- func (layer Layer) FeatureCount(force bool) (count int, ok bool)
- func (layer Layer) GeometryColumn() string
- func (layer Layer) Name() string
- func (layer Layer) NextFeature() *Feature
- func (layer Layer) ReorderField(oldIndex, newIndex int) error
- func (layer Layer) ReorderFields(layerMap []int) error
- func (layer Layer) ResetReading()
- func (layer Layer) RollbackTransaction() error
- func (layer Layer) SetAttributeFilter(filter string) error
- func (layer Layer) SetFeature(feature Feature) error
- func (layer Layer) SetIgnoredFields(names []string) error
- func (layer Layer) SetNextByIndex(index int64) error
- func (layer Layer) SetSpatialFilter(filter Geometry)
- func (layer Layer) SetSpatialFilterRect(minX, minY, maxX, maxY float64)
- func (layer Layer) SpatialFilter() Geometry
- func (layer Layer) SpatialReference() SpatialReference
- func (layer Layer) StartTransaction() error
- func (layer Layer) Sync() error
- func (layer Layer) TestCapability(capability string) bool
- func (layer Layer) Type() GeometryType
- type MajorObject
- func (object MajorObject) Description() string
- func (object MajorObject) Metadata(domain string) []string
- func (object MajorObject) MetadataItem(name, domain string) string
- func (object MajorObject) SetDescription(desc string)
- func (object MajorObject) SetMetadata(metadata []string, domain string)
- func (object MajorObject) SetMetadataItem(name, value, domain string)
- type OGRDriver
- func (driver OGRDriver) Copy(source DataSource, name string, options []string) (newDS DataSource, ok bool)
- func (driver OGRDriver) Create(name string, options []string) (newDS DataSource, ok bool)
- func (driver OGRDriver) Delete(filename string) error
- func (driver OGRDriver) Deregister()
- func (driver OGRDriver) Name() string
- func (driver OGRDriver) Open(filename string, update int) (newDS DataSource, ok bool)
- func (driver OGRDriver) Register()
- func (driver OGRDriver) TestCapability(capability string) bool
- type OGRErr
- type OGRErrContainer
- type OpenFlag
- type PaletteInterp
- type ProgressFunc
- type RATFieldType
- type RATFieldUsage
- type RWFlag
- type RasterAttributeTable
- func (rat RasterAttributeTable) ColOfUsage(rfu RATFieldUsage) int
- func (rat RasterAttributeTable) ColumnCount() int
- func (rat RasterAttributeTable) CreateColumn(name string, rft RATFieldType, rfu RATFieldUsage) error
- func (rat RasterAttributeTable) Destroy()
- func (rat RasterAttributeTable) FromColorTable(ct ColorTable) error
- func (rat RasterAttributeTable) LinearBinning() (row0min, binsize float64, exists bool)
- func (rat RasterAttributeTable) NameOfCol(index int) string
- func (rat RasterAttributeTable) RowCount() int
- func (rat RasterAttributeTable) RowOfValue(val float64) (int, bool)
- func (rat RasterAttributeTable) SetLinearBinning(row0min, binsize float64) error
- func (rat RasterAttributeTable) SetRowCount(count int)
- func (rat RasterAttributeTable) SetValueAsFloat64(row, field int, val float64)
- func (rat RasterAttributeTable) SetValueAsInt(row, field, val int)
- func (rat RasterAttributeTable) SetValueAsString(row, field int, val string)
- func (rat RasterAttributeTable) ToColorTable(count int) ColorTable
- func (rat RasterAttributeTable) TypeOfCol(index int) RATFieldType
- func (rat RasterAttributeTable) UsageOfCol(index int) RATFieldUsage
- func (rat RasterAttributeTable) ValueAsFloat64(row, field int) float64
- func (rat RasterAttributeTable) ValueAsInt(row, field int) int
- func (rat RasterAttributeTable) ValueAsString(row, field int) string
- type RasterBand
- func (rasterBand RasterBand) AdviseRead(xOff, yOff, xSize, ySize, bufXSize, bufYSize int, dataType DataType, ...) error
- func (rasterBand RasterBand) BandNumber() int
- func (rasterBand RasterBand) BlockSize() (int, int)
- func (rasterBand RasterBand) CategoryNames() []string
- func (rb RasterBand) Checksum(xOff, yOff, xSize, ySize int) int
- func (rasterBand RasterBand) ColorInterp() ColorInterp
- func (rasterBand RasterBand) ColorTable() ColorTable
- func (rasterBand RasterBand) ComputeMinMax(approxOK int) (min, max float64)
- func (src RasterBand) ComputeProximity(dest RasterBand, options []string, progress ProgressFunc, data interface{}) error
- func (rasterBand RasterBand) ComputeStatistics(approxOK int, progress ProgressFunc, data interface{}) (min, max, mean, stdDev float64)
- func (src RasterBand) ContourGenerate(interval, base float64, fixedLevels []float64, useNoDataValue int, ...) error
- func (rasterBand RasterBand) CreateMaskBand(flags int) error
- func (rasterBand RasterBand) DefaultHistogram(force int, progress ProgressFunc, data interface{}) (min, max float64, buckets int, histogram []int, err error)
- func (src RasterBand) FPolygonize(mask RasterBand, layer Layer, fieldIndex int, options []string, ...) error
- func (rasterBand RasterBand) Fill(real, imaginary float64) error
- func (src RasterBand) FillNoData(mask RasterBand, distance float64, iterations int, options []string, ...) error
- func (rasterBand RasterBand) FlushCache()
- func (rasterBand RasterBand) GetAccess() Access
- func (rasterBand RasterBand) GetDataset() Dataset
- func (rasterBand RasterBand) GetDefaultRAT() RasterAttributeTable
- func (rasterBand RasterBand) GetMaskBand() RasterBand
- func (rasterBand RasterBand) GetMaskFlags() int
- func (rasterBand RasterBand) GetMaximum() (val float64, valid bool)
- func (rasterBand RasterBand) GetMinimum() (val float64, valid bool)
- func (rasterBand RasterBand) GetOffset() (float64, bool)
- func (rasterBand RasterBand) GetScale() (float64, bool)
- func (rasterBand RasterBand) GetStatistics(approxOK, force int) (min, max, mean, stdDev float64)
- func (rasterBand RasterBand) GetUnitType() string
- func (rasterBand RasterBand) HasArbitraryOverviews() int
- func (rasterBand RasterBand) Histogram(min, max float64, buckets int, includeOutOfRange, approxOK int, ...) ([]int, error)
- func (rasterBand RasterBand) IO(rwFlag RWFlag, xOff, yOff, xSize, ySize int, buffer interface{}, ...) error
- func (object *RasterBand) MetadataItem(name, domain string) string
- func (rasterBand RasterBand) NoDataValue() (val float64, valid bool)
- func (rasterBand RasterBand) Overview(level int) RasterBand
- func (rasterBand RasterBand) OverviewCount() int
- func (src RasterBand) Polygonize(mask RasterBand, layer Layer, fieldIndex int, options []string, ...) error
- func (sourceRaster RasterBand) RasterBandCopyWholeRaster(destRaster RasterBand, options []string, progress ProgressFunc, ...) error
- func (rasterBand RasterBand) RasterDataType() DataType
- func (rasterBand RasterBand) ReadBlock(xOff, yOff int, dataPtr unsafe.Pointer) error
- func (sourceRaster RasterBand) RegenerateOverview(destRasterBand RasterBand, resampling string, progress ProgressFunc, ...) error
- func (sourceRaster RasterBand) RegenerateOverviews(overviewCount int, destRasterBands *RasterBand, resampling string, ...) error
- func (rasterBand RasterBand) SetColorInterp(colorInterp ColorInterp) error
- func (rasterBand RasterBand) SetColorTable(colorTable ColorTable) error
- func (rasterBand RasterBand) SetDefaultRAT(rat RasterAttributeTable) error
- func (rasterBand *RasterBand) SetMetadataItem(name, value, domain string) error
- func (rasterBand RasterBand) SetNoDataValue(val float64) error
- func (rasterBand RasterBand) SetOffset(offset float64) error
- func (rasterBand RasterBand) SetRasterCategoryNames(names []string) error
- func (rasterBand RasterBand) SetScale(scale float64) error
- func (rasterBand RasterBand) SetStatistics(min, max, mean, stdDev float64) error
- func (rasterBand RasterBand) SetUnitType(unit string) error
- func (src RasterBand) SieveFilter(mask, dest RasterBand, threshold, connectedness int, options []string, ...) error
- func (rasterBand RasterBand) WriteBlock(xOff, yOff int, dataPtr unsafe.Pointer) error
- func (rasterBand RasterBand) XSize() int
- func (rasterBand RasterBand) YSize() int
- type ResampleAlg
- type SpatialReference
- func (sr SpatialReference) AngularUnits() (string, float64)
- func (sr SpatialReference) AttrValue(key string, child int) (value string, ok bool)
- func (sr SpatialReference) AuthorityCode(target string) string
- func (sr SpatialReference) AuthorityName(target string) string
- func (sr SpatialReference) AutoIdentifyEPSG() error
- func (sr SpatialReference) Clone() SpatialReference
- func (sr SpatialReference) CloneGeogCS() SpatialReference
- func (sr SpatialReference) CopyGeographicCSFrom(other SpatialReference) error
- func (sr SpatialReference) Dereference() int
- func (sr SpatialReference) Destroy()
- func (sr SpatialReference) EPSGTreatsAsLatLong() bool
- func (sr SpatialReference) FromEPSG(code int) error
- func (sr SpatialReference) FromEPSGA(code int) error
- func (sr SpatialReference) FromERM(proj, datum, units string) error
- func (sr SpatialReference) FromESRI(input string) error
- func (sr SpatialReference) FromPCI(proj, units string, params []float64) error
- func (sr SpatialReference) FromProj4(input string) error
- func (sr SpatialReference) FromURL(url string) error
- func (sr SpatialReference) FromUSGS(projsys, zone int, params []float64, datum int) error
- func (sr SpatialReference) FromWKT(wkt string) error
- func (sr SpatialReference) FromXML(xml string) error
- func (sr SpatialReference) InverseFlattening() (float64, error)
- func (sr SpatialReference) IsCompound() bool
- func (sr SpatialReference) IsGeocentric() bool
- func (sr SpatialReference) IsGeographic() bool
- func (sr SpatialReference) IsLocal() bool
- func (sr SpatialReference) IsProjected() bool
- func (sr SpatialReference) IsSame(other SpatialReference) bool
- func (sr SpatialReference) IsSameGeographicCS(other SpatialReference) bool
- func (sr SpatialReference) IsSameVerticalCS(other SpatialReference) bool
- func (sr SpatialReference) IsVertical() bool
- func (sr SpatialReference) LinearUnits() (string, float64)
- func (sr SpatialReference) MorphFromESRI() error
- func (sr SpatialReference) MorphToESRI() error
- func (sr SpatialReference) NormalizedProjectionParameter(name string, defaultValue float64) (float64, error)
- func (sr SpatialReference) PrimeMeridian() (string, float64)
- func (sr SpatialReference) ProjectionParameter(name string, defaultValue float64) (float64, error)
- func (sr SpatialReference) Reference() int
- func (sr SpatialReference) Release()
- func (sr SpatialReference) SemiMajorAxis() (float64, error)
- func (sr SpatialReference) SemiMinorAxis() (float64, error)
- func (sr SpatialReference) SetACEA(stdp1, stdp2, centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetAE(centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetAngularUnits(units string, radians float64) error
- func (sr SpatialReference) SetAttrValue(path, value string) error
- func (sr SpatialReference) SetAuthority(target, authority string, code int) error
- func (sr SpatialReference) SetAxisMappingStrategy(strategy AxisMappingStrategy)
- func (sr SpatialReference) SetBonne(standardParallel, centralMeridian, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetCEA(stdp1, centralMeridian, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetCS(centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetCompoundCS(name string, horizontal, vertical SpatialReference) error
- func (sr SpatialReference) SetEC(stdp1, stdp2, centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetEckert(variation int, centralMeridian, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetEquirectangular(centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetEquirectangularGeneralized(centerLat, centerLong, psuedoStdParallel, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetFromUserInput(name string) error
- func (sr SpatialReference) SetGEOS(centralMeridian, satelliteHeight, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetGH(centralMeridian, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetGS(centralMeridian, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetGSTM(centerLat, centerLong, scale, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetGeocentricCS(name string) error
- func (sr SpatialReference) SetGeographicCS(geogName, datumName, spheroidName string, semiMajor, flattening float64, ...) error
- func (sr SpatialReference) SetGnomonic(centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetHOM(...) error
- func (sr SpatialReference) SetHOM2PNO(...) error
- func (sr SpatialReference) SetIGH() error
- func (sr SpatialReference) SetIWMPolyconic(lat1, lat2, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetKrovak(...) error
- func (sr SpatialReference) SetLAEA(centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetLCC(stdp1, stdp2, centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetLCC1SP(centerLat, centerLong, scale, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetLCCB(stdp1, stdp2, centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetLinearUnits(name string, toMeters float64) error
- func (sr SpatialReference) SetLinearUnitsAndUpdateParameters(name string, toMeters float64) error
- func (sr SpatialReference) SetLocalCS(name string) error
- func (sr SpatialReference) SetMC(centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetMercator(centerLat, centerLong, scale, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetMollweide(centralMeridian, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetNZMG(centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetNormalizedProjectionParameter(name string, value float64) error
- func (sr SpatialReference) SetOS(originLat, meridian, scale, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetOrthographic(centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetPS(centerLat, centerLong, scale, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetPolyconic(centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetProjectedCS(name string) error
- func (sr SpatialReference) SetProjectionByName(name string) error
- func (sr SpatialReference) SetProjectionParameter(name string, value float64) error
- func (sr SpatialReference) SetRobinson(centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetSOC(latitudeOfOrigin, centralMeridian, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetSinusoidal(centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetStatePlane(zone int, nad83 bool) error
- func (sr SpatialReference) SetStatePlaneWithUnits(zone int, nad83 bool, unitName string, factor float64) error
- func (sr SpatialReference) SetStereographic(centerLat, centerLong, scale, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetTM(centerLat, centerLong, scale, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetTMG(centerLat, centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetTMSO(centerLat, centerLong, scale, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetTMVariant(variantName string, ...) error
- func (sr SpatialReference) SetTOWGS84(dx, dy, dz, ex, ey, ez, ppm float64) error
- func (sr SpatialReference) SetTargetLinearUnits(target, units string, toMeters float64) error
- func (sr SpatialReference) SetUTM(zone int, north bool) error
- func (sr SpatialReference) SetVDG(centerLong, falseEasting, falseNorthing float64) error
- func (sr SpatialReference) SetVerticalCS(csName, datumName string, datumType int) error
- func (sr SpatialReference) SetWellKnownGeographicCS(name string) error
- func (sr SpatialReference) TOWGS84() (coeff [7]float64, err error)
- func (sr SpatialReference) TargetLinearUnits(target string) (string, float64)
- func (sr SpatialReference) ToMICoordSys() (output string, errVal error)
- func (sr SpatialReference) ToPCI() (proj, units string, params []float64, errVal error)
- func (sr SpatialReference) ToPrettyWKT(simplify bool) (string, error)
- func (sr SpatialReference) ToProj4() (string, error)
- func (sr SpatialReference) ToUSGS() (proj, zone int, params []float64, datum int, errVal error)
- func (sr SpatialReference) ToWKT() (string, error)
- func (sr SpatialReference) ToXML() (xml string, errVal error)
- func (sr SpatialReference) UTMZone() (zone int, north bool)
- func (sr SpatialReference) Validate() error
- type StyleMgr
- type StyleTable
- type StyleTool
- type VSILFILE
Constants ¶
const ( GA_InverseDistancetoAPower = GridAlgorithm(C.GGA_InverseDistanceToAPower) GA_MovingAverage = GridAlgorithm(C.GGA_MovingAverage) GA_NearestNeighbor = GridAlgorithm(C.GGA_NearestNeighbor) GA_MetricMinimum = GridAlgorithm(C.GGA_MetricMinimum) GA_MetricMaximum = GridAlgorithm(C.GGA_MetricMaximum) GA_MetricRange = GridAlgorithm(C.GGA_MetricRange) GA_MetricCount = GridAlgorithm(C.GGA_MetricCount) GA_MetricAverageDistance = GridAlgorithm(C.GGA_MetricAverageDistance) GA_MetricAverageDistancePts = GridAlgorithm(C.GGA_MetricAverageDistancePts) GA_Linear = GridAlgorithm(C.GGA_Linear) GA_InverseDistanceToAPowerNearestNeighbor = GridAlgorithm(C.GGA_InverseDistanceToAPowerNearestNeighbor) )
const ( VERSION_MAJOR = int(C.GDAL_VERSION_MAJOR) VERSION_MINOR = int(C.GDAL_VERSION_MINOR) VERSION_REV = int(C.GDAL_VERSION_REV) VERSION_BUILD = int(C.GDAL_VERSION_BUILD) VERSION_NUM = int(C.GDAL_VERSION_NUM) RELEASE_DATE = int(C.GDAL_RELEASE_DATE) RELEASE_NAME = string(C.GDAL_RELEASE_NAME) GDT_Unknown = int(C.GDT_Unknown) GDT_Byte = int(C.GDT_Byte) GDT_UInt16 = int(C.GDT_UInt16) GDT_Int16 = int(C.GDT_Int16) GDT_UInt32 = int(C.GDT_UInt32) GDT_Int32 = int(C.GDT_Int32) GDT_Float32 = int(C.GDT_Float32) GDT_Float64 = int(C.GDT_Float64) GDT_CInt16 = int(C.GDT_CInt16) GDT_CInt32 = int(C.GDT_CInt32) GDT_CFloat32 = int(C.GDT_CFloat32) GDT_CFloat64 = int(C.GDT_CFloat64) GDT_TypeCount = int(C.GDT_TypeCount) GA_ReadOnly = int(C.GA_ReadOnly) GA_Update = int(C.GA_Update) GF_Read = int(C.GF_Read) GF_Write = int(C.GF_Write) GRIORA_NearestNeighbour = int(C.GRIORA_NearestNeighbour) GRIORA_Bilinear = int(C.GRIORA_Bilinear) GRIORA_Cubic = int(C.GRIORA_Cubic) GRIORA_CubicSpline = int(C.GRIORA_CubicSpline) GRIORA_Lanczos = int(C.GRIORA_Lanczos) GRIORA_Average = int(C.GRIORA_Average) GRIORA_Mode = int(C.GRIORA_Mode) GRIORA_Gauss = int(C.GRIORA_Gauss) GCI_Undefined = int(C.GCI_Undefined) GCI_GrayIndex = int(C.GCI_GrayIndex) GCI_PaletteIndex = int(C.GCI_PaletteIndex) GCI_RedBand = int(C.GCI_RedBand) GCI_GreenBand = int(C.GCI_GreenBand) GCI_BlueBand = int(C.GCI_BlueBand) GCI_AlphaBand = int(C.GCI_AlphaBand) GCI_HueBand = int(C.GCI_HueBand) GCI_SaturationBand = int(C.GCI_SaturationBand) GCI_LightnessBand = int(C.GCI_LightnessBand) GCI_CyanBand = int(C.GCI_CyanBand) GCI_MagentaBand = int(C.GCI_MagentaBand) GCI_YellowBand = int(C.GCI_YellowBand) GCI_BlackBand = int(C.GCI_BlackBand) GCI_YCbCr_YBand = int(C.GCI_YCbCr_YBand) GCI_YCbCr_CrBand = int(C.GCI_YCbCr_CrBand) GCI_YCbCr_CbBand = int(C.GCI_YCbCr_CbBand) GRA_Average = int(C.GRA_Average) GRA_Mode = int(C.GRA_Mode) GRA_Max = int(C.GRA_Max) GRA_Min = int(C.GRA_Min) GRA_Med = int(C.GRA_Med) GRA_Q1 = int(C.GRA_Q1) GRA_Q3 = int(C.GRA_Q3) GPI_Gray = int(C.GPI_Gray) GPI_RGB = int(C.GPI_RGB) GPI_CMYK = int(C.GPI_CMYK) GPI_HLS = int(C.GPI_HLS) CXT_Element = int(C.CXT_Element) CXT_Text = int(C.CXT_Text) CXT_Attribute = int(C.CXT_Attribute) CXT_Comment = int(C.CXT_Comment) CXT_Literal = int(C.CXT_Literal) CPLE_None = int(C.CPLE_None) CPLE_AppDefined = int(C.CPLE_AppDefined) CPLE_OutOfMemory = int(C.CPLE_OutOfMemory) CPLE_FileIO = int(C.CPLE_FileIO) CPLE_OpenFailed = int(C.CPLE_OpenFailed) CPLE_IllegalArg = int(C.CPLE_IllegalArg) CPLE_NotSupported = int(C.CPLE_NotSupported) CPLE_AssertionFailed = int(C.CPLE_AssertionFailed) CPLE_NoWriteAccess = int(C.CPLE_NoWriteAccess) CPLE_UserInterrupt = int(C.CPLE_UserInterrupt) CPLE_ObjectNull = int(C.CPLE_ObjectNull) CPLE_HttpResponse = int(C.CPLE_HttpResponse) CPLE_AWSBucketNotFound = int(C.CPLE_AWSBucketNotFound) CPLE_AWSObjectNotFound = int(C.CPLE_AWSObjectNotFound) CPLE_AWSAccessDenied = int(C.CPLE_AWSAccessDenied) CPLE_AWSInvalidCredentials = int(C.CPLE_AWSInvalidCredentials) CPLE_AWSSignatureDoesNotMatch = int(C.CPLE_AWSSignatureDoesNotMatch) GRTT_THEMATIC = int(C.GRTT_THEMATIC) GRTT_ATHEMATIC = int(C.GRTT_ATHEMATIC) GMF_ALL_VALID = int(C.GMF_ALL_VALID) GMF_PER_DATASET = int(C.GMF_PER_DATASET) GMF_ALPHA = int(C.GMF_ALPHA) GMF_NODATA = int(C.GMF_NODATA) GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED = int(C.GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED) GDAL_DATA_COVERAGE_STATUS_DATA = int(C.GDAL_DATA_COVERAGE_STATUS_DATA) GDAL_DATA_COVERAGE_STATUS_EMPTY = int(C.GDAL_DATA_COVERAGE_STATUS_EMPTY) GARIO_PENDING = int(C.GARIO_PENDING) GARIO_UPDATE = int(C.GARIO_UPDATE) GARIO_ERROR = int(C.GARIO_ERROR) GARIO_COMPLETE = int(C.GARIO_COMPLETE) GTO_TIP = int(C.GTO_TIP) GTO_BIT = int(C.GTO_BIT) GTO_BSQ = int(C.GTO_BSQ) )
const ( CE_None = CPLErr(C.CE_None) CE_Debug = CPLErr(C.CE_Debug) CE_Warning = CPLErr(C.CE_Warning) CE_Failure = CPLErr(C.CE_Failure) CE_Fatal = CPLErr(C.CE_Fatal) )
const ( OGRERR_NONE = OGRErr(C.OGRERR_NONE) OGRERR_NOT_ENOUGH_DATA = OGRErr(C.OGRERR_NOT_ENOUGH_DATA) OGRERR_NOT_ENOUGH_MEMORY = OGRErr(C.OGRERR_NOT_ENOUGH_MEMORY) OGRERR_UNSUPPORTED_GEOMETRY_TYPE = OGRErr(C.OGRERR_UNSUPPORTED_GEOMETRY_TYPE) OGRERR_UNSUPPORTED_OPERATION = OGRErr(C.OGRERR_UNSUPPORTED_OPERATION) OGRERR_CORRUPT_DATA = OGRErr(C.OGRERR_CORRUPT_DATA) OGRERR_FAILURE = OGRErr(C.OGRERR_FAILURE) OGRERR_UNSUPPORTED_SRS = OGRErr(C.OGRERR_UNSUPPORTED_SRS) OGRERR_INVALID_HANDLE = OGRErr(C.OGRERR_INVALID_HANDLE) OGRERR_NON_EXISTING_FEATURE = OGRErr(C.OGRERR_NON_EXISTING_FEATURE) )
const ( Unknown = DataType(C.GDT_Unknown) Byte = DataType(C.GDT_Byte) UInt16 = DataType(C.GDT_UInt16) Int16 = DataType(C.GDT_Int16) UInt32 = DataType(C.GDT_UInt32) Int32 = DataType(C.GDT_Int32) Float32 = DataType(C.GDT_Float32) Float64 = DataType(C.GDT_Float64) CInt16 = DataType(C.GDT_CInt16) CInt32 = DataType(C.GDT_CInt32) CFloat32 = DataType(C.GDT_CFloat32) CFloat64 = DataType(C.GDT_CFloat64) )
const ( AR_Pending = AsyncStatusType(C.GARIO_PENDING) AR_Update = AsyncStatusType(C.GARIO_UPDATE) AR_Error = AsyncStatusType(C.GARIO_ERROR) AR_Complete = AsyncStatusType(C.GARIO_COMPLETE) )
const ( // Read only (no update) access ReadOnly = Access(C.GA_ReadOnly) // Read/write access. Update = Access(C.GA_Update) )
const ( // Read data Read = RWFlag(C.GF_Read) // Write data Write = RWFlag(C.GF_Write) )
const ( OFReadOnly = OpenFlag(C.GDAL_OF_READONLY) OFUpdate = OpenFlag(C.GDAL_OF_UPDATE) OFVector = OpenFlag(C.GDAL_OF_VECTOR) OFRaster = OpenFlag(C.GDAL_OF_RASTER) OFVerbose_Error = OpenFlag(C.GDAL_OF_VERBOSE_ERROR) )
const ( CI_Undefined = ColorInterp(C.GCI_Undefined) CI_GrayIndex = ColorInterp(C.GCI_GrayIndex) CI_PaletteIndex = ColorInterp(C.GCI_PaletteIndex) CI_RedBand = ColorInterp(C.GCI_RedBand) CI_GreenBand = ColorInterp(C.GCI_GreenBand) CI_BlueBand = ColorInterp(C.GCI_BlueBand) CI_AlphaBand = ColorInterp(C.GCI_AlphaBand) CI_HueBand = ColorInterp(C.GCI_HueBand) CI_SaturationBand = ColorInterp(C.GCI_SaturationBand) CI_LightnessBand = ColorInterp(C.GCI_LightnessBand) CI_CyanBand = ColorInterp(C.GCI_CyanBand) CI_MagentaBand = ColorInterp(C.GCI_MagentaBand) CI_YellowBand = ColorInterp(C.GCI_YellowBand) CI_BlackBand = ColorInterp(C.GCI_BlackBand) CI_YCbCr_YBand = ColorInterp(C.GCI_YCbCr_YBand) CI_YCbCr_CbBand = ColorInterp(C.GCI_YCbCr_CbBand) CI_YCbCr_CrBand = ColorInterp(C.GCI_YCbCr_CrBand) CI_Max = ColorInterp(C.GCI_Max) )
const ( // Grayscale (in GDALColorEntry.c1) PI_Gray = PaletteInterp(C.GPI_Gray) // Red, Green, Blue and Alpha in (in c1, c2, c3 and c4) PI_RGB = PaletteInterp(C.GPI_RGB) // Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4) PI_CMYK = PaletteInterp(C.GPI_CMYK) // Hue, Lightness and Saturation (in c1, c2, and c3) PI_HLS = PaletteInterp(C.GPI_HLS) )
const ( MD_AREA_OR_POINT = string(C.GDALMD_AREA_OR_POINT) MD_AOP_AREA = string(C.GDALMD_AOP_AREA) MD_AOP_POINT = string(C.GDALMD_AOP_POINT) )
"well known" metadata items.
const ( DMD_LONGNAME = string(C.GDAL_DMD_LONGNAME) DMD_HELPTOPIC = string(C.GDAL_DMD_HELPTOPIC) DMD_MIMETYPE = string(C.GDAL_DMD_MIMETYPE) DMD_EXTENSION = string(C.GDAL_DMD_EXTENSION) DMD_CREATIONOPTIONLIST = string(C.GDAL_DMD_CREATIONOPTIONLIST) DMD_CREATIONDATATYPES = string(C.GDAL_DMD_CREATIONDATATYPES) DCAP_CREATE = string(C.GDAL_DCAP_CREATE) DCAP_CREATECOPY = string(C.GDAL_DCAP_CREATECOPY) DCAP_VIRTUALIO = string(C.GDAL_DCAP_VIRTUALIO) DCAP_OPEN = string(C.GDAL_DCAP_OPEN) DCAP_RASTER = string(C.GDAL_DCAP_RASTER) DCAP_VECTOR = string(C.GDAL_DCAP_VECTOR) DCAP_NOTNULL_FIELDS = string(C.GDAL_DCAP_NOTNULL_FIELDS) DCAP_DEFAULT_FIELDS = string(C.GDAL_DCAP_DEFAULT_FIELDS) DCAP_NOTNULL_GEOMFIELDS = string(C.GDAL_DCAP_NOTNULL_GEOMFIELDS) DCAP_UNIQUE_FIELDS = string(C.GDAL_DCAP_UNIQUE_FIELDS) )
const ( GRA_NearestNeighbour = ResampleAlg(0) GRA_Bilinear = ResampleAlg(1) GRA_Cubic = ResampleAlg(2) GRA_CubicSpline = ResampleAlg(3) GRA_Lanczos = ResampleAlg(4) )
const ( GFT_Integer = RATFieldType(C.GFT_Integer) GFT_Real = RATFieldType(C.GFT_Real) GFT_String = RATFieldType(C.GFT_String) )
const ( GFU_Generic = RATFieldUsage(C.GFU_Generic) GFU_PixelCount = RATFieldUsage(C.GFU_PixelCount) GFU_Name = RATFieldUsage(C.GFU_Name) GFU_Min = RATFieldUsage(C.GFU_Min) GFU_Max = RATFieldUsage(C.GFU_Max) GFU_MinMax = RATFieldUsage(C.GFU_MinMax) GFU_Red = RATFieldUsage(C.GFU_Red) GFU_Green = RATFieldUsage(C.GFU_Green) GFU_Blue = RATFieldUsage(C.GFU_Blue) GFU_Alpha = RATFieldUsage(C.GFU_Alpha) GFU_RedMin = RATFieldUsage(C.GFU_RedMin) GFU_GreenMin = RATFieldUsage(C.GFU_GreenMin) GFU_BlueMin = RATFieldUsage(C.GFU_BlueMin) GFU_AlphaMin = RATFieldUsage(C.GFU_AlphaMin) GFU_RedMax = RATFieldUsage(C.GFU_RedMax) GFU_GreenMax = RATFieldUsage(C.GFU_GreenMax) GFU_BlueMax = RATFieldUsage(C.GFU_BlueMax) GFU_AlphaMax = RATFieldUsage(C.GFU_AlphaMax) GFU_MaxCount = RATFieldUsage(C.GFU_MaxCount) )
const ( GT_Unknown = GeometryType(C.wkbUnknown) GT_Point = GeometryType(C.wkbPoint) GT_LineString = GeometryType(C.wkbLineString) GT_Polygon = GeometryType(C.wkbPolygon) GT_MultiPoint = GeometryType(C.wkbMultiPoint) GT_MultiLineString = GeometryType(C.wkbMultiLineString) GT_MultiPolygon = GeometryType(C.wkbMultiPolygon) GT_GeometryCollection = GeometryType(C.wkbGeometryCollection) GT_None = GeometryType(C.wkbNone) GT_LinearRing = GeometryType(C.wkbLinearRing) GT_Point25D = GeometryType(C.wkbPoint25D) GT_LineString25D = GeometryType(C.wkbLineString25D) GT_Polygon25D = GeometryType(C.wkbPolygon25D) GT_MultiPoint25D = GeometryType(C.wkbMultiPoint25D) GT_MultiLineString25D = GeometryType(C.wkbMultiLineString25D) GT_MultiPolygon25D = GeometryType(C.wkbMultiPolygon25D) GT_GeometryCollection25D = GeometryType(C.wkbGeometryCollection25D) )
const ( FT_Integer = FieldType(C.OFTInteger) FT_IntegerList = FieldType(C.OFTIntegerList) FT_Real = FieldType(C.OFTReal) FT_RealList = FieldType(C.OFTRealList) FT_String = FieldType(C.OFTString) FT_StringList = FieldType(C.OFTStringList) FT_Binary = FieldType(C.OFTBinary) FT_Date = FieldType(C.OFTDate) FT_Time = FieldType(C.OFTTime) FT_DateTime = FieldType(C.OFTDateTime) FT_Integer64 = FieldType(C.OFTInteger64) FT_Integer64List = FieldType(C.OFTInteger64List) )
const ( J_Undefined = Justification(C.OJUndefined) J_Left = Justification(C.OJLeft) J_Right = Justification(C.OJRight) )
const ( OAMS_TraditionalGisOrder = AxisMappingStrategy(C.OAMS_TRADITIONAL_GIS_ORDER) OAMS_AuthorityCompliant = AxisMappingStrategy(C.OAMS_AUTHORITY_COMPLIANT) OAMS_Custom = AxisMappingStrategy(C.OAMS_CUSTOM) )
Variables ¶
var ( ErrDebug = errors.New("Debug Error") ErrWarning = errors.New("Warning Error") ErrFailure = errors.New("Failure Error") ErrFatal = errors.New("Fatal Error") ErrIllegal = errors.New("Illegal Error") ErrNotEnoughData = errors.New("Not Enough Data") ErrNotEnoughMemory = errors.New("Not Enough Memory") ErrUnsupportedGeometryType = errors.New("Unsupported Geometry Type") ErrUnsupportedOperation = errors.New("Unsupported Operation") ErrCorruptData = errors.New("Corrupt Data") ErrUnsupportedSRS = errors.New("Unsupported SRS") ErrInvalidHandle = errors.New("Invalid Handle") ErrNonExistingFeature = errors.New("Non Existing Feature") )
Functions ¶
func CUIntBigSliceToInt ¶
func ComputeMedianCutPCT ¶
func ComputeMedianCutPCT( red, green, blue RasterBand, colors int, ct ColorTable, progress ProgressFunc, data interface{}, ) int
Compute optimal PCT for RGB image
func CreateScaledProgress ¶
func DestroyScaledProgress ¶
func DitherRGB2PCT ¶
func DitherRGB2PCT( red, green, blue, target RasterBand, ct ColorTable, progress ProgressFunc, data interface{}, ) int
24bit to 8bit conversion with dithering
func DummyProgress ¶
func GridCreate ¶
func GridCreate( algorithm GridAlgorithm, options interface{}, x, y, z []float64, xMin, xMax, yMin, yMax float64, nX, nY uint, progress ProgressFunc, data interface{}, ) ([]float64, error)
GridCreate: Create regular grid from the scattered data. This function takes the arrays of X and Y coordinates and corresponding Z values as input and computes regular grid (or call it a raster) from these scattered data. You should supply geometry and extent of the output grid.
func InvGeoTransform ¶
Invert the supplied transform
func ReprojectImage ¶
func ReprojectImage( srcDs, destDs Dataset, srcWkt, destWkt string, alg ResampleAlg, memoryLimit, maxerror float64, progress ProgressFunc, data unsafe.Pointer, options []string, ) error
func ScaledProgress ¶
func TermProgress ¶
Types ¶
type AsyncReader ¶
type AsyncReader struct {
// contains filtered or unexported fields
}
type AsyncStatusType ¶
type AsyncStatusType int
status of the asynchronous stream
func GetAsyncStatusTypeByName ¶
func GetAsyncStatusTypeByName(statusTypeName string) AsyncStatusType
func (AsyncStatusType) Name ¶
func (statusType AsyncStatusType) Name() string
type AxisMappingStrategy ¶
type AxisMappingStrategy uint32
type CPLErrContainer ¶
func (CPLErrContainer) Err ¶
func (err CPLErrContainer) Err() error
Error handling. The following is bare-bones, and needs to be replaced with something more useful.
type ColorEntry ¶
type ColorEntry struct {
// contains filtered or unexported fields
}
func (*ColorEntry) Get ¶
func (ce *ColorEntry) Get() (c1, c2, c3, c4 uint8)
func (*ColorEntry) Set ¶
func (ce *ColorEntry) Set(c1, c2, c3, c4 uint)
type ColorInterp ¶
type ColorInterp int
Types of color interpretation for raster bands.
func GetColorInterpretationByName ¶
func GetColorInterpretationByName(name string) ColorInterp
func (ColorInterp) Name ¶
func (colorInterp ColorInterp) Name() string
type ColorTable ¶
type ColorTable struct {
// contains filtered or unexported fields
}
func CreateColorTable ¶
func CreateColorTable(interp PaletteInterp) ColorTable
Construct a new color table
func (ColorTable) CreateColorRamp ¶
func (ct ColorTable) CreateColorRamp(start, end int, startColor, endColor ColorEntry)
Create color ramp
func (ColorTable) Entry ¶
func (ct ColorTable) Entry(index int) ColorEntry
Fetch a color entry from table
func (ColorTable) EntryCount ¶
func (ct ColorTable) EntryCount() int
Get number of color entries in table
func (ColorTable) PaletteInterpretation ¶
func (ct ColorTable) PaletteInterpretation() PaletteInterp
Fetch palette interpretation
func (ColorTable) SetEntry ¶
func (ct ColorTable) SetEntry(index int, entry ColorEntry)
Set entry in color table
type CoordinateTransform ¶
type CoordinateTransform struct {
// contains filtered or unexported fields
}
func CreateCoordinateTransform ¶
func CreateCoordinateTransform( source SpatialReference, dest SpatialReference, ) CoordinateTransform
Create a new CoordinateTransform
func (CoordinateTransform) Destroy ¶
func (ct CoordinateTransform) Destroy()
Destroy CoordinateTransform
func (CoordinateTransform) TransformPoint ¶
type DataSource ¶
type DataSource struct {
// contains filtered or unexported fields
}
func OpenDataSource ¶
func OpenDataSource(name string, update int) DataSource
Open a file / data source with one of the registered drivers
func OpenDataSourceByIndex ¶
func OpenDataSourceByIndex(index int) DataSource
Return the i'th datasource opened
func OpenSharedDataSource ¶
func OpenSharedDataSource(name string, update int) DataSource
Open a shared file / data source with one of the registered drivers
func (DataSource) CopyLayer ¶
func (ds DataSource) CopyLayer( source Layer, name string, options []string, ) Layer
Duplicate an existing layer
func (DataSource) CreateLayer ¶
func (ds DataSource) CreateLayer( name string, sr SpatialReference, geomType GeometryType, options []string, ) Layer
Create a new layer on the data source
func (DataSource) Delete ¶
func (ds DataSource) Delete(index int) error
Delete the layer from the data source
func (DataSource) Driver ¶
func (ds DataSource) Driver() OGRDriver
Fetch the driver that the data source was opened with
func (DataSource) ExecuteSQL ¶
func (ds DataSource) ExecuteSQL(sql string, filter Geometry, dialect string) Layer
Execute an SQL statement against the data source
func (DataSource) LayerByIndex ¶
func (ds DataSource) LayerByIndex(index int) Layer
Fetch a layer of this data source by index
func (DataSource) LayerByName ¶
func (ds DataSource) LayerByName(name string) Layer
Fetch a layer of this data source by name
func (DataSource) LayerCount ¶
func (ds DataSource) LayerCount() int
Fetch the number of layers in this data source
func (DataSource) Release ¶
func (ds DataSource) Release() error
Drop a reference to this datasource and destroy if reference is zero
func (DataSource) ReleaseResultSet ¶
func (ds DataSource) ReleaseResultSet(layer Layer)
Release the results of ExecuteSQL
func (DataSource) TestCapability ¶
func (ds DataSource) TestCapability(capability string) bool
Test if the data source has the indicated capability
type Dataset ¶
type Dataset struct {
// contains filtered or unexported fields
}
func DEMProcessing ¶
func OpenEx ¶
func OpenEx(filename string, flags OpenFlag, allowedDrivers []string, openOptions []string, siblingFiles []string) (Dataset, error)
Open an existing dataset
func OpenShared ¶
Open a shared existing dataset
func VectorTranslate ¶
func (Dataset) AdviseRead ¶
func (dataset Dataset) AdviseRead( rwFlag RWFlag, xOff, yOff, xSize, ySize, bufXSize, bufYSize int, dataType DataType, bandCount int, bandMap []int, options []string, ) error
Advise driver of upcoming read requests
func (Dataset) AutoCreateWarpedVRT ¶
func (dataset Dataset) AutoCreateWarpedVRT(srcWKT, dstWKT string, resampleAlg ResampleAlg) (Dataset, error)
func (Dataset) BuildOverviews ¶
func (dataset Dataset) BuildOverviews( resampling string, nOverviews int, overviewList []int, nBands int, bandList []int, progress ProgressFunc, data interface{}, ) error
Build raster overview(s)
func (Dataset) CopyWholeRaster ¶
func (sourceDataset Dataset) CopyWholeRaster( destDataset Dataset, options []string, progress ProgressFunc, data interface{}, ) error
Copy all dataset raster data
func (Dataset) CreateMaskBand ¶
Adds a mask band to the dataset
func (Dataset) GDALDereferenceDataset ¶
Subtract one from dataset reference count
func (Dataset) GDALGetGCPProjection ¶
Get projection of GCPs
func (Dataset) GDALGetInternalHandle ¶
Fetch a format specific internally meaningful handle
func (Dataset) GDALReferenceDataset ¶
Add one to dataset reference count
func (Dataset) GeoTransform ¶
Get the affine transformation coefficients
func (Dataset) IO ¶
func (dataset Dataset) IO( rwFlag RWFlag, xOff, yOff, xSize, ySize int, buffer interface{}, bufXSize, bufYSize int, bandCount int, bandMap []int, pixelSpace, lineSpace, bandSpace int, ) error
Read / write a region of image data from multiple bands
func (Dataset) InvGeoTransform ¶
Return the inverted transform
func (*Dataset) MetadataItem ¶
func (Dataset) Projection ¶
Fetch the projection definition string for this dataset
func (Dataset) RasterBand ¶
func (dataset Dataset) RasterBand(band int) RasterBand
Fetch a raster band object from a dataset
func (Dataset) RasterCount ¶
Fetch the number of raster bands in the dataset
func (Dataset) SetGeoTransform ¶
Set the affine transformation coefficients
func (*Dataset) SetMetadataItem ¶
func (Dataset) SetProjection ¶
Set the projection reference string
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func GetDriverByName ¶
Return the driver by short name
func IdentifyDriver ¶
Return the driver needed to access the provided dataset name.
func (Driver) CopyDatasetFiles ¶
Copy all files associated with the named dataset
func (Driver) Create ¶
func (driver Driver) Create( filename string, xSize, ySize, bands int, dataType DataType, options []string, ) Dataset
Create a new dataset with this driver.
func (Driver) CreateCopy ¶
func (driver Driver) CreateCopy( filename string, sourceDataset Dataset, strict int, options []string, progress ProgressFunc, data interface{}, ) Dataset
Create a copy of a dataset
func (Driver) DeleteDataset ¶
Delete named dataset
func (*Driver) MetadataItem ¶
Fetch single metadata item.
func (Driver) RenameDataset ¶
Rename named dataset
type Envelope ¶
type Envelope struct {
// contains filtered or unexported fields
}
func (Envelope) Intersects ¶
Test if one envelope intersects another
type Envelope3D ¶
type Envelope3D struct {
// contains filtered or unexported fields
}
func (Envelope3D) Contains ¶
func (env Envelope3D) Contains(other Envelope3D) bool
Test if one envelope3D completely contains another
func (Envelope3D) Intersect ¶
func (env Envelope3D) Intersect(other Envelope3D) Envelope3D
Return the intersection of this envelope3D with another
func (Envelope3D) Intersects ¶
func (env Envelope3D) Intersects(other Envelope3D) bool
Test if one envelope3D intersects another
func (Envelope3D) IsInit ¶
func (env Envelope3D) IsInit() bool
func (Envelope3D) MaxX ¶
func (env Envelope3D) MaxX() float64
func (Envelope3D) MaxY ¶
func (env Envelope3D) MaxY() float64
func (Envelope3D) MaxZ ¶
func (env Envelope3D) MaxZ() float64
func (Envelope3D) MinX ¶
func (env Envelope3D) MinX() float64
func (Envelope3D) MinY ¶
func (env Envelope3D) MinY() float64
func (Envelope3D) MinZ ¶
func (env Envelope3D) MinZ() float64
func (*Envelope3D) SetMaxX ¶
func (env *Envelope3D) SetMaxX(val float64)
func (*Envelope3D) SetMaxY ¶
func (env *Envelope3D) SetMaxY(val float64)
func (*Envelope3D) SetMaxZ ¶
func (env *Envelope3D) SetMaxZ(val float64)
func (*Envelope3D) SetMinX ¶
func (env *Envelope3D) SetMinX(val float64)
func (*Envelope3D) SetMinY ¶
func (env *Envelope3D) SetMinY(val float64)
func (*Envelope3D) SetMinZ ¶
func (env *Envelope3D) SetMinZ(val float64)
func (Envelope3D) Union ¶
func (env Envelope3D) Union(other Envelope3D) Envelope3D
Return the union of this envelope3D with another one
type Feature ¶
type Feature struct {
// contains filtered or unexported fields
}
func (Feature) Definition ¶
func (feature Feature) Definition() FeatureDefinition
Fetch feature definition
func (Feature) FieldAsBinary ¶
Fetch field as binary data
func (Feature) FieldAsDateTime ¶
Fetch field as date and time
func (Feature) FieldAsFloat64 ¶
Fetch field value as float64
func (Feature) FieldAsFloat64List ¶
Fetch field as list of float64
func (Feature) FieldAsInteger ¶
Fetch field value as integer
func (Feature) FieldAsInteger64 ¶
Fetch field value as 64-bit integer
func (Feature) FieldAsInteger64List ¶
Fetch field as list of 64-bit integers
func (Feature) FieldAsIntegerList ¶
Fetch field as list of integers
func (Feature) FieldAsString ¶
Fetch field value as string
func (Feature) FieldAsStringList ¶
Fetch field as list of strings
func (Feature) FieldCount ¶
Fetch number of fields on this feature
func (Feature) FieldDefinition ¶
func (feature Feature) FieldDefinition(index int) FieldDefinition
Fetch definition for the indicated field
func (Feature) FieldIndex ¶
Fetch the field index for the given field name
func (Feature) IsFieldSet ¶
Return if a field has ever been assigned a value
func (Feature) IsFieldSetAndNotNull ¶
Test if a field is set and not null.
func (Feature) SetFieldBinary ¶
Set field as binary data
func (Feature) SetFieldDateTime ¶
Set field as date / time
func (Feature) SetFieldFloat64 ¶
Set field to float64 value
func (Feature) SetFieldFloat64List ¶
Set field to list of float64
func (Feature) SetFieldInteger ¶
Set field to integer value
func (Feature) SetFieldInteger64 ¶
Set field to 64-bit integer value
func (Feature) SetFieldInteger64List ¶
Set field to list of 64-bit integers
func (Feature) SetFieldIntegerList ¶
Set field to list of integers
func (Feature) SetFieldRaw ¶
Set field from the raw field pointer
func (Feature) SetFieldString ¶
Set field to string value
func (Feature) SetFieldStringList ¶
Set field to list of strings
func (Feature) SetFromWithMap ¶
Set one feature from another, using field map
func (Feature) SetGeometry ¶
Set feature geometry
func (Feature) SetGeometryDirectly ¶
Set feature geometry, passing ownership to the feature
func (Feature) SetStyleString ¶
Set style string for this feature
func (Feature) StealGeometry ¶
Fetch geometry of this feature and assume ownership
func (Feature) StlyeString ¶
Fetch style string for this feature
func (Feature) UnnsetField ¶
Clear a field and mark it as unset
type FeatureDefinition ¶
type FeatureDefinition struct {
// contains filtered or unexported fields
}
func CreateFeatureDefinition ¶
func CreateFeatureDefinition(name string) FeatureDefinition
Create a new feature definition object
func (FeatureDefinition) AddFieldDefinition ¶
func (fd FeatureDefinition) AddFieldDefinition(fieldDefn FieldDefinition)
Add a new field definition to this feature definition
func (FeatureDefinition) Create ¶
func (fd FeatureDefinition) Create() Feature
Create a feature from this feature definition
func (FeatureDefinition) DeleteFieldDefinition ¶
func (fd FeatureDefinition) DeleteFieldDefinition(index int) error
Delete a field definition from this feature definition
func (FeatureDefinition) Dereference ¶
func (fd FeatureDefinition) Dereference() int
Decrement the reference count by one
func (FeatureDefinition) Destroy ¶
func (fd FeatureDefinition) Destroy()
Destroy a feature definition object
func (FeatureDefinition) FieldCount ¶
func (fd FeatureDefinition) FieldCount() int
Fetch the number of fields in the feature definition
func (FeatureDefinition) FieldDefinition ¶
func (fd FeatureDefinition) FieldDefinition(index int) FieldDefinition
Fetch the definition of the indicated field
func (FeatureDefinition) FieldIndex ¶
func (fd FeatureDefinition) FieldIndex(name string) int
Fetch the index of the named field
func (FeatureDefinition) GeometryType ¶
func (fd FeatureDefinition) GeometryType() GeometryType
Fetch the geometry base type of this feature definition
func (FeatureDefinition) IsGeometryIgnored ¶
func (fd FeatureDefinition) IsGeometryIgnored() bool
Fetch if the geometry can be ignored when fetching features
func (FeatureDefinition) IsStyleIgnored ¶
func (fd FeatureDefinition) IsStyleIgnored() bool
Fetch if the style can be ignored when fetching features
func (FeatureDefinition) Name ¶
func (fd FeatureDefinition) Name() string
Fetch the name of this feature definition
func (FeatureDefinition) Reference ¶
func (fd FeatureDefinition) Reference() int
Increment the reference count by one
func (FeatureDefinition) ReferenceCount ¶
func (fd FeatureDefinition) ReferenceCount() int
Fetch the current reference count
func (FeatureDefinition) Release ¶
func (fd FeatureDefinition) Release()
Drop a reference, and delete object if no references remain
func (FeatureDefinition) SetGeometryIgnored ¶
func (fd FeatureDefinition) SetGeometryIgnored(val bool)
Set whether the geometry can be ignored when fetching features
func (FeatureDefinition) SetGeometryType ¶
func (fd FeatureDefinition) SetGeometryType(geomType GeometryType)
Set the geometry base type for this feature definition
func (FeatureDefinition) SetStyleIgnored ¶
func (fd FeatureDefinition) SetStyleIgnored(val bool)
Set whether the style can be ignored when fetching features
type FieldDefinition ¶
type FieldDefinition struct {
// contains filtered or unexported fields
}
func CreateFieldDefinition ¶
func CreateFieldDefinition(name string, fieldType FieldType) FieldDefinition
Create a new field definition
func (FieldDefinition) AlternativeName ¶
func (fd FieldDefinition) AlternativeName() string
Fetch the alternative name (or "alias") of the field
func (FieldDefinition) IsIgnored ¶
func (fd FieldDefinition) IsIgnored() bool
Fetch whether this field should be ignored when fetching features
func (FieldDefinition) Justification ¶
func (fd FieldDefinition) Justification() Justification
Fetch the justification for this field
func (FieldDefinition) Precision ¶
func (fd FieldDefinition) Precision() int
Fetch the precision for this field
func (FieldDefinition) Set ¶
func (fd FieldDefinition) Set( name string, fType FieldType, width, precision int, justify Justification, )
Set defining parameters of field in a single call
func (FieldDefinition) SetAlternateName ¶
func (fd FieldDefinition) SetAlternateName(name string)
Reset the alternative name (or "alias") for this field.
func (FieldDefinition) SetIgnored ¶
func (fd FieldDefinition) SetIgnored(ignore bool)
Set whether this field should be ignored when fetching features
func (FieldDefinition) SetJustification ¶
func (fd FieldDefinition) SetJustification(justify Justification)
Set the justification for this field
func (FieldDefinition) SetName ¶
func (fd FieldDefinition) SetName(name string)
Set the name of the field
func (FieldDefinition) SetPrecision ¶
func (fd FieldDefinition) SetPrecision(precision int)
Set the precision for this field
func (FieldDefinition) SetType ¶
func (fd FieldDefinition) SetType(fType FieldType)
Set the type of this field
func (FieldDefinition) SetWidth ¶
func (fd FieldDefinition) SetWidth(width int)
Set the formatting width for this field
func (FieldDefinition) Type ¶
func (fd FieldDefinition) Type() FieldType
Fetch the type of this field
func (FieldDefinition) Width ¶
func (fd FieldDefinition) Width() int
Fetch the formatting width for this field
type Geometry ¶
type Geometry struct {
// contains filtered or unexported fields
}
func ApproximateArcAngles ¶
func ApproximateArcAngles( x, y, z, primaryRadius, secondaryRadius, rotation, startAngle, endAngle, stepSizeDegrees float64, ) Geometry
Stroke arc to linestring
func Create ¶
func Create(geomType GeometryType) Geometry
Create an empty geometry of the desired type
func CreateFromGML ¶
Create a geometry from its GML representation
func CreateFromJson ¶
Create a geometry object from its GeoJSON representation
func CreateFromWKB ¶
func CreateFromWKB(wkb []uint8, srs SpatialReference, bytes int) (Geometry, error)
Create a geometry object from its well known binary representation
func CreateFromWKT ¶
func CreateFromWKT(wkt string, srs SpatialReference) (Geometry, error)
Create a geometry object from its well known text representation
func (Geometry) AddGeometry ¶
Add a geometry to a geometry container
func (Geometry) AddGeometryDirectly ¶
Add a geometry to a geometry container and assign ownership to that container
func (Geometry) AddPoint2D ¶
Add a new point to the geometry (line string or polygon only), ignoring the 3rd dimension
func (Geometry) BuildPolygonFromEdges ¶
Build a polygon / ring from a set of lines
func (Geometry) ConvexHull ¶
Compute convex hull for the geometry
func (Geometry) CoordinateDimension ¶
Get the dimension of the coordinates in this geometry
func (Geometry) Difference ¶
Compute difference between this geometry and the other
func (Geometry) Distance3D ¶
Compute 3D distance between thie geometry and the other. This method is built on the SFCGAL library, check it for the definition of the geometry operation. If OGR is built without the SFCGAL library, this method will always return -1.0
func (Geometry) Envelope3D ¶
func (geom Geometry) Envelope3D() Envelope3D
Compute and return the 3D bounding envelope for this geometry
func (Geometry) ForceToMultiLineString ¶
Convert to multilinestring
func (Geometry) ForceToMultiPoint ¶
Convert to multipoint
func (Geometry) ForceToMultiPolygon ¶
Convert to multipolygon
func (Geometry) GeometryCount ¶
Fetch the number of elements in the geometry, or number of geometries in the container
func (Geometry) Intersection ¶
Compute intersection of this geometry with the other
func (Geometry) Intersects ¶
Return true if these features intersect
func (Geometry) PointCount ¶
Fetch number of points in the geometry
func (Geometry) Polygonize ¶
Polygonize a set of sparse edges
func (Geometry) RemoveGeometry ¶
Remove a geometry from the geometry container
func (Geometry) Segmentize ¶
Modify the geometry such that it has no line segment longer than the given distance
func (Geometry) SetCoordinateDimension ¶
Set the dimension of the coordinates in this geometry
func (Geometry) SetPoint2D ¶
Set the coordinates of a point in the geometry, ignoring the 3rd dimension
func (Geometry) SetSpatialReference ¶
func (geom Geometry) SetSpatialReference(spatialRef SpatialReference)
Assign a spatial reference to this geometry
func (Geometry) SimplifyPreservingTopology ¶
Simplify the geometry while preserving topology
func (Geometry) SpatialReference ¶
func (geom Geometry) SpatialReference() SpatialReference
Fetch the spatial reference associated with this geometry
func (Geometry) SymmetricDifference ¶
Compute symmetric difference between this geometry and the other
func (Geometry) Transform ¶
func (geom Geometry) Transform(ct CoordinateTransform) error
Apply coordinate transformation to geometry
func (Geometry) TransformTo ¶
func (geom Geometry) TransformTo(sr SpatialReference) error
Transform geometry to new spatial reference system
func (Geometry) UnionCascaded ¶
type GridDataMetricsOptions ¶
type GridDataMetricsOptions struct { // SizeOfStructure: Added in GDAL 3.6 to detect potential ABI issues. Should be set to sizeof(GridDataMetricsOptions) SizeOfStructure uintptr // Radius1: The first radius (X axis if rotation angle is 0) of search ellipse. Radius1 float64 // Radius2: The second radius (Y axis if rotation angle is 0) of search ellipse. Radius2 float64 // Angle: Angle of ellipse rotation in degrees. Ellipse rotated counter clockwise. Angle float64 // MinPoints: Minimum number of data points to use. // If less amount of points found the grid node considered empty and will be filled with NODATA marker. MinPoints uint32 // NoDataValue: No data marker to fill empty points. NoDataValue float64 }
GridDataMetricsOptions: Data metrics method control options
type GridInverseDistanceToAPowerNearestNeighborOptions ¶
type GridInverseDistanceToAPowerNearestNeighborOptions struct { // SizeOfStructure: Added in GDAL 3.6 to detect potential ABI issues. Should be set to sizeof(GridInverseDistanceToAPowerNearestNeighborOptions) SizeOfStructure uintptr // Power: Weighting power Power float64 // Radius: The radius of search circle Radius float64 // Smoothing: Smoothing parameter Smoothing float64 // MaxPoints: Maximum number of data points to use. // Do not search for more points than this number. If less amount of points found the grid node // considered empty and will be filled with NODATA marker. MaxPoints uint32 // MinPoints: Minimum number of data points to use. // If less amount of points found the grid node considered empty and will be filled with NODATA marker. MinPoints uint32 // NoDataValue: No data marker to fill empty points. NoDataValue float64 }
GridInverseDistanceToAPowerNearestNeighborOptions: Inverse distance to a power, with nearest neighbour search, control options
type GridInverseDistanceToAPowerOptions ¶
type GridInverseDistanceToAPowerOptions struct { // SizeOfStructure: Added in GDAL 3.6 to detect potential ABI issues. Should be set to sizeof(GridInverseDistanceToAPowerOptions) SizeOfStructure uintptr // Power: Weighting power Power float64 // Smoothing: Smoothing parameter Smoothing float64 // AnisotropyRatio: Reserved for future use AnisotropyRatio float64 // AnisotropyAngle: Reserved for future use AnisotropyAngle float64 // Radius1: The first radius (X axis if rotation angle is 0) of search ellipse. Radius1 float64 // Radius2: The second radius (Y axis if rotation angle is 0) of search ellipse. Radius2 float64 // Angle: Angle of ellipse rotation in degrees. Ellipse rotated counter clockwise. Angle float64 // MaxPoints: Maximum number of data points to use. // Do not search for more points than this number. If less amount of points found the grid node // considered empty and will be filled with NODATA marker. MaxPoints uint32 // MinPoints: Minimum number of data points to use. // If less amount of points found the grid node considered empty and will be filled with NODATA marker. MinPoints uint32 // NoDataValue: No data marker to fill empty points. NoDataValue float64 }
GridInverseDistanceToAPowerOptions: Inverse distance to a power method control options.
type GridLinearOptions ¶
type GridLinearOptions struct { // SizeOfStructure: Added in GDAL 3.6 to detect potential ABI issues. Should be set to sizeof(GDALGridLinearOptions) SizeOfStructure uintptr // Radius: in case the point to be interpolated does not fit into a triangle of the Delaunay triangulation, // use that maximum distance to search a nearest neighbour, or use nodata otherwise. If set to -1, the search // distance is infinite. If set to 0, nodata value will be always used. Radius float64 // NoDataValue: no data marker to fill empty points. NoDataValue float64 }
GridLinearOptions: Linear method control options.
type GridMovingAverageOptions ¶
type GridMovingAverageOptions struct { // SizeOfStructure: Added in GDAL 3.6 to detect potential ABI issues. Should be set to sizeof(GridMovingAverageOptions) SizeOfStructure uintptr // Radius1: The first radius (X axis if rotation angle is 0) of search ellipse. Radius1 float64 // Radius2: The second radius (Y axis if rotation angle is 0) of search ellipse. Radius2 float64 // Angle: Angle of ellipse rotation in degrees. Ellipse rotated counter clockwise. Angle float64 // MinPoints: Minimum number of data points to use. // If less amount of points found the grid node considered empty and will be filled with NODATA marker. MinPoints uint32 // NoDataValue: No data marker to fill empty points. NoDataValue float64 }
GridMovingAverageOptions: Moving average method control options
type GridNearestNeighborOptions ¶
type GridNearestNeighborOptions struct { // SizeOfStructure: Added in GDAL 3.6 to detect potential ABI issues. Should be set to sizeof(GridNearestNeighborOptions) SizeOfStructure uintptr // Radius1: The first radius (X axis if rotation angle is 0) of search ellipse. Radius1 float64 // Radius2: The second radius (Y axis if rotation angle is 0) of search ellipse. Radius2 float64 // Angle: Angle of ellipse rotation in degrees. Ellipse rotated counter clockwise. Angle float64 // NoDataValue: No data marker to fill empty points. NoDataValue float64 }
GridNearestNeighborOptions: Nearest neighbor method control options.
type Justification ¶
type Justification int
type Layer ¶
type Layer struct {
// contains filtered or unexported fields
}
func (Layer) AlterFieldDefn ¶
func (layer Layer) AlterFieldDefn(index int, newDefn FieldDefinition, flags int) error
Alter the definition of an existing field of a layer
func (Layer) CommitTransaction ¶
Commit a transaction on data sources which support it
func (Layer) CreateField ¶
func (layer Layer) CreateField(fd FieldDefinition, approxOK bool) error
Create a new field on a layer
func (Layer) Definition ¶
func (layer Layer) Definition() FeatureDefinition
Fetch the schema information for this layer
func (Layer) DeleteField ¶
Delete a field from the layer
func (Layer) FeatureCount ¶
Fetch the feature count for this layer
func (Layer) GeometryColumn ¶
Fetch the name of the geometry column
func (Layer) NextFeature ¶
Fetch the next available feature from this layer
func (Layer) ReorderField ¶
Reorder an existing field of a layer
func (Layer) ReorderFields ¶
Reorder all the fields of a layer
func (Layer) ResetReading ¶
func (layer Layer) ResetReading()
Reset reading to start on the first featre
func (Layer) RollbackTransaction ¶
Roll back the current transaction on data sources which support it
func (Layer) SetAttributeFilter ¶
Set a new attribute query filter
func (Layer) SetFeature ¶
Rewrite the provided feature
func (Layer) SetIgnoredFields ¶
Set which fields can be ignored when retrieving features from the layer
func (Layer) SetNextByIndex ¶
Move read cursor to the provided index
func (Layer) SetSpatialFilter ¶
Set a new spatial filter for this layer
func (Layer) SetSpatialFilterRect ¶
Set a new rectangular spatial filter for this layer
func (Layer) SpatialFilter ¶
Return the current spatial filter for this layer
func (Layer) SpatialReference ¶
func (layer Layer) SpatialReference() SpatialReference
Fetch the spatial reference system for this layer
func (Layer) StartTransaction ¶
Begin a transation on data sources which support it
func (Layer) TestCapability ¶
Test if this layer supports the named capability
type MajorObject ¶
type MajorObject struct {
// contains filtered or unexported fields
}
func (MajorObject) Description ¶
func (object MajorObject) Description() string
Fetch object description
func (MajorObject) Metadata ¶
func (object MajorObject) Metadata(domain string) []string
Fetch metadata
func (MajorObject) MetadataItem ¶
func (object MajorObject) MetadataItem(name, domain string) string
Fetch a single metadata item
func (MajorObject) SetDescription ¶
func (object MajorObject) SetDescription(desc string)
Set object description
func (MajorObject) SetMetadata ¶
func (object MajorObject) SetMetadata(metadata []string, domain string)
Set metadata
func (MajorObject) SetMetadataItem ¶
func (object MajorObject) SetMetadataItem(name, value, domain string)
Set a single metadata item
type OGRDriver ¶
type OGRDriver struct {
// contains filtered or unexported fields
}
func OGRDriverByIndex ¶
Fetch the indicated driver by index
func OGRDriverByName ¶
Fetch the indicated driver by name
func (OGRDriver) Copy ¶
func (driver OGRDriver) Copy(source DataSource, name string, options []string) (newDS DataSource, ok bool)
Create a new datasource with this driver by copying all layers of the existing datasource
func (OGRDriver) Create ¶
func (driver OGRDriver) Create(name string, options []string) (newDS DataSource, ok bool)
Create a new data source based on this driver
func (OGRDriver) Deregister ¶
func (driver OGRDriver) Deregister()
Remove a driver from the list of registered drivers
func (OGRDriver) Open ¶
func (driver OGRDriver) Open(filename string, update int) (newDS DataSource, ok bool)
Attempt to open file with this driver
func (OGRDriver) Register ¶
func (driver OGRDriver) Register()
Add a driver to the list of registered drivers
func (OGRDriver) TestCapability ¶
Test if this driver supports the named capability
type OGRErrContainer ¶
func (OGRErrContainer) Err ¶
func (err OGRErrContainer) Err() error
type PaletteInterp ¶
type PaletteInterp int
Types of color interpretations for a GDALColorTable.
func (PaletteInterp) Name ¶
func (paletteInterp PaletteInterp) Name() string
type ProgressFunc ¶
type RATFieldType ¶
type RATFieldType int
type RATFieldUsage ¶
type RATFieldUsage int
type RasterAttributeTable ¶
type RasterAttributeTable struct {
// contains filtered or unexported fields
}
func CreateRasterAttributeTable ¶
func CreateRasterAttributeTable() RasterAttributeTable
Construct empty raster attribute table
func (RasterAttributeTable) ColOfUsage ¶
func (rat RasterAttributeTable) ColOfUsage(rfu RATFieldUsage) int
Fetch column index for indicated usage
func (RasterAttributeTable) ColumnCount ¶
func (rat RasterAttributeTable) ColumnCount() int
Fetch table column count
func (RasterAttributeTable) CreateColumn ¶
func (rat RasterAttributeTable) CreateColumn(name string, rft RATFieldType, rfu RATFieldUsage) error
Create new column
func (RasterAttributeTable) FromColorTable ¶
func (rat RasterAttributeTable) FromColorTable(ct ColorTable) error
Initialize RAT from color table
func (RasterAttributeTable) LinearBinning ¶
func (rat RasterAttributeTable) LinearBinning() (row0min, binsize float64, exists bool)
Fetch linear binning information
func (RasterAttributeTable) NameOfCol ¶
func (rat RasterAttributeTable) NameOfCol(index int) string
Fetch the name of indicated column
func (RasterAttributeTable) RowCount ¶
func (rat RasterAttributeTable) RowCount() int
Fetch row count
func (RasterAttributeTable) RowOfValue ¶
func (rat RasterAttributeTable) RowOfValue(val float64) (int, bool)
Get row for pixel value
func (RasterAttributeTable) SetLinearBinning ¶
func (rat RasterAttributeTable) SetLinearBinning(row0min, binsize float64) error
Set linear binning information
func (RasterAttributeTable) SetRowCount ¶
func (rat RasterAttributeTable) SetRowCount(count int)
Set row count
func (RasterAttributeTable) SetValueAsFloat64 ¶
func (rat RasterAttributeTable) SetValueAsFloat64(row, field int, val float64)
Set field value from float64
func (RasterAttributeTable) SetValueAsInt ¶
func (rat RasterAttributeTable) SetValueAsInt(row, field, val int)
Set field value from integer
func (RasterAttributeTable) SetValueAsString ¶
func (rat RasterAttributeTable) SetValueAsString(row, field int, val string)
Set field value from string
func (RasterAttributeTable) ToColorTable ¶
func (rat RasterAttributeTable) ToColorTable(count int) ColorTable
Translate RAT to a color table
func (RasterAttributeTable) TypeOfCol ¶
func (rat RasterAttributeTable) TypeOfCol(index int) RATFieldType
Fetch the type of indicated column
func (RasterAttributeTable) UsageOfCol ¶
func (rat RasterAttributeTable) UsageOfCol(index int) RATFieldUsage
Fetch the usage of indicated column
func (RasterAttributeTable) ValueAsFloat64 ¶
func (rat RasterAttributeTable) ValueAsFloat64(row, field int) float64
Fetch field value as float64
func (RasterAttributeTable) ValueAsInt ¶
func (rat RasterAttributeTable) ValueAsInt(row, field int) int
Fetch field value as integer
func (RasterAttributeTable) ValueAsString ¶
func (rat RasterAttributeTable) ValueAsString(row, field int) string
Fetch field value as string
type RasterBand ¶
type RasterBand struct {
// contains filtered or unexported fields
}
func (RasterBand) AdviseRead ¶
func (rasterBand RasterBand) AdviseRead( xOff, yOff, xSize, ySize, bufXSize, bufYSize int, dataType DataType, options []string, ) error
Advise driver of upcoming read requests
func (RasterBand) BandNumber ¶
func (rasterBand RasterBand) BandNumber() int
Fetch the band number of this raster band
func (RasterBand) BlockSize ¶
func (rasterBand RasterBand) BlockSize() (int, int)
Fetch the "natural" block size of this band
func (RasterBand) CategoryNames ¶
func (rasterBand RasterBand) CategoryNames() []string
Fetch the list of category names for this raster
func (RasterBand) Checksum ¶
func (rb RasterBand) Checksum(xOff, yOff, xSize, ySize int) int
Compute checksum for image region
func (RasterBand) ColorInterp ¶
func (rasterBand RasterBand) ColorInterp() ColorInterp
How should this band be interpreted as color?
func (RasterBand) ColorTable ¶
func (rasterBand RasterBand) ColorTable() ColorTable
Fetch the color table associated with this raster band
func (RasterBand) ComputeMinMax ¶
func (rasterBand RasterBand) ComputeMinMax(approxOK int) (min, max float64)
Compute the min / max values for a band
func (RasterBand) ComputeProximity ¶
func (src RasterBand) ComputeProximity( dest RasterBand, options []string, progress ProgressFunc, data interface{}, ) error
Compute the proximity of all pixels in the image to a set of pixels in the source image
func (RasterBand) ComputeStatistics ¶
func (rasterBand RasterBand) ComputeStatistics( approxOK int, progress ProgressFunc, data interface{}, ) (min, max, mean, stdDev float64)
Compute image statistics
func (RasterBand) ContourGenerate ¶
func (src RasterBand) ContourGenerate( interval, base float64, fixedLevels []float64, useNoDataValue int, noDataValue float64, layer Layer, idFieldIndex int, elevationFieldIndex int, progress ProgressFunc, data interface{}, ) error
ContourGenerate creates vector contours in intervals relative to base from raster DEM band. If fixedLevels are defined, the contours are generated at the specified levels instead. The contours are written to the provided layer using idField- and elevationFieldIndex.
func (RasterBand) CreateMaskBand ¶
func (rasterBand RasterBand) CreateMaskBand(flags int) error
Adds a mask band to the current band
func (RasterBand) DefaultHistogram ¶
func (rasterBand RasterBand) DefaultHistogram( force int, progress ProgressFunc, data interface{}, ) (min, max float64, buckets int, histogram []int, err error)
Fetch default raster histogram
func (RasterBand) FPolygonize ¶
func (src RasterBand) FPolygonize( mask RasterBand, layer Layer, fieldIndex int, options []string, progress ProgressFunc, data interface{}, ) error
Create polygon coverage from raster data using a floating point buffer
func (RasterBand) Fill ¶
func (rasterBand RasterBand) Fill(real, imaginary float64) error
Fill this band with a constant value
func (RasterBand) FillNoData ¶
func (src RasterBand) FillNoData( mask RasterBand, distance float64, iterations int, options []string, progress ProgressFunc, data interface{}, ) error
Fill selected raster regions by interpolation from the edges
func (RasterBand) GetAccess ¶
func (rasterBand RasterBand) GetAccess() Access
Find out if we have update permission for this band
func (RasterBand) GetDataset ¶
func (rasterBand RasterBand) GetDataset() Dataset
Fetch the owning dataset handle
func (RasterBand) GetDefaultRAT ¶
func (rasterBand RasterBand) GetDefaultRAT() RasterAttributeTable
Fetch default Raster Attribute Table
func (RasterBand) GetMaskBand ¶
func (rasterBand RasterBand) GetMaskBand() RasterBand
Return the mask band associated with the band
func (RasterBand) GetMaskFlags ¶
func (rasterBand RasterBand) GetMaskFlags() int
Return the status flags of the mask band associated with the band
func (RasterBand) GetMaximum ¶
func (rasterBand RasterBand) GetMaximum() (val float64, valid bool)
Fetch the maximum value for this band
func (RasterBand) GetMinimum ¶
func (rasterBand RasterBand) GetMinimum() (val float64, valid bool)
Fetch the minimum value for this band
func (RasterBand) GetOffset ¶
func (rasterBand RasterBand) GetOffset() (float64, bool)
Fetch the raster value offset
func (RasterBand) GetScale ¶
func (rasterBand RasterBand) GetScale() (float64, bool)
Fetch the raster value scale
func (RasterBand) GetStatistics ¶
func (rasterBand RasterBand) GetStatistics(approxOK, force int) (min, max, mean, stdDev float64)
Fetch image statistics
func (RasterBand) GetUnitType ¶
func (rasterBand RasterBand) GetUnitType() string
Return raster unit type
func (RasterBand) HasArbitraryOverviews ¶
func (rasterBand RasterBand) HasArbitraryOverviews() int
Check for arbitrary overviews
func (RasterBand) Histogram ¶
func (rasterBand RasterBand) Histogram( min, max float64, buckets int, includeOutOfRange, approxOK int, progress ProgressFunc, data interface{}, ) ([]int, error)
Compute raster histogram
func (RasterBand) IO ¶
func (rasterBand RasterBand) IO( rwFlag RWFlag, xOff, yOff, xSize, ySize int, buffer interface{}, bufXSize, bufYSize int, pixelSpace, lineSpace int, ) error
Read / Write a region of image data for this band
func (*RasterBand) MetadataItem ¶
func (object *RasterBand) MetadataItem(name, domain string) string
func (RasterBand) NoDataValue ¶
func (rasterBand RasterBand) NoDataValue() (val float64, valid bool)
Fetch the no data value for this band
func (RasterBand) Overview ¶
func (rasterBand RasterBand) Overview(level int) RasterBand
Fetch overview raster band object
func (RasterBand) OverviewCount ¶
func (rasterBand RasterBand) OverviewCount() int
Return the number of overview layers available
func (RasterBand) Polygonize ¶
func (src RasterBand) Polygonize( mask RasterBand, layer Layer, fieldIndex int, options []string, progress ProgressFunc, data interface{}, ) error
Create polygon coverage from raster data using an integer buffer
func (RasterBand) RasterBandCopyWholeRaster ¶
func (sourceRaster RasterBand) RasterBandCopyWholeRaster( destRaster RasterBand, options []string, progress ProgressFunc, data interface{}, ) error
Copy all raster band raster data
func (RasterBand) RasterDataType ¶
func (rasterBand RasterBand) RasterDataType() DataType
Fetch the pixel data type for this band
func (RasterBand) ReadBlock ¶
func (rasterBand RasterBand) ReadBlock(xOff, yOff int, dataPtr unsafe.Pointer) error
Read a block of image data efficiently
func (RasterBand) RegenerateOverview ¶
func (sourceRaster RasterBand) RegenerateOverview( destRasterBand RasterBand, resampling string, progress ProgressFunc, data interface{}, ) error
func (RasterBand) RegenerateOverviews ¶
func (sourceRaster RasterBand) RegenerateOverviews( overviewCount int, destRasterBands *RasterBand, resampling string, progress ProgressFunc, data interface{}, ) error
Generate downsampled overviews
func (RasterBand) SetColorInterp ¶
func (rasterBand RasterBand) SetColorInterp(colorInterp ColorInterp) error
Set color interpretation of the raster band
func (RasterBand) SetColorTable ¶
func (rasterBand RasterBand) SetColorTable(colorTable ColorTable) error
Set the raster color table for this raster band
func (RasterBand) SetDefaultRAT ¶
func (rasterBand RasterBand) SetDefaultRAT(rat RasterAttributeTable) error
Set default Raster Attribute Table
func (*RasterBand) SetMetadataItem ¶
func (rasterBand *RasterBand) SetMetadataItem(name, value, domain string) error
func (RasterBand) SetNoDataValue ¶
func (rasterBand RasterBand) SetNoDataValue(val float64) error
Set the no data value for this band
func (RasterBand) SetOffset ¶
func (rasterBand RasterBand) SetOffset(offset float64) error
Set scaling offset
func (RasterBand) SetRasterCategoryNames ¶
func (rasterBand RasterBand) SetRasterCategoryNames(names []string) error
Set the category names for this band
func (RasterBand) SetScale ¶
func (rasterBand RasterBand) SetScale(scale float64) error
Set scaling ratio
func (RasterBand) SetStatistics ¶
func (rasterBand RasterBand) SetStatistics(min, max, mean, stdDev float64) error
Set statistics on raster band
func (RasterBand) SetUnitType ¶
func (rasterBand RasterBand) SetUnitType(unit string) error
Set unit type
func (RasterBand) SieveFilter ¶
func (src RasterBand) SieveFilter( mask, dest RasterBand, threshold, connectedness int, options []string, progress ProgressFunc, data interface{}, ) error
Removes small raster polygons
func (RasterBand) WriteBlock ¶
func (rasterBand RasterBand) WriteBlock(xOff, yOff int, dataPtr unsafe.Pointer) error
Write a block of image data efficiently
type ResampleAlg ¶
type ResampleAlg int
type SpatialReference ¶
type SpatialReference struct {
// contains filtered or unexported fields
}
func CreateSpatialReference ¶
func CreateSpatialReference(wkt string) SpatialReference
Create a new SpatialReference
func (SpatialReference) AngularUnits ¶
func (sr SpatialReference) AngularUnits() (string, float64)
Fetch the angular units for the geographic coordinate system
func (SpatialReference) AttrValue ¶
func (sr SpatialReference) AttrValue(key string, child int) (value string, ok bool)
Fetch indicated attribute of named node
func (SpatialReference) AuthorityCode ¶
func (sr SpatialReference) AuthorityCode(target string) string
Get the authority code for a node
func (SpatialReference) AuthorityName ¶
func (sr SpatialReference) AuthorityName(target string) string
Get the authority name for a node
func (SpatialReference) AutoIdentifyEPSG ¶
func (sr SpatialReference) AutoIdentifyEPSG() error
Set EPSG authority info if possible
func (SpatialReference) Clone ¶
func (sr SpatialReference) Clone() SpatialReference
Make a duplicate of this spatial reference
func (SpatialReference) CloneGeogCS ¶
func (sr SpatialReference) CloneGeogCS() SpatialReference
Make a duplicate of the GEOGCS node of this spatial reference
func (SpatialReference) CopyGeographicCSFrom ¶
func (sr SpatialReference) CopyGeographicCSFrom(other SpatialReference) error
Copy geographic CS from another spatial reference
func (SpatialReference) Dereference ¶
func (sr SpatialReference) Dereference() int
Decrements the reference count by one, returning reference count
func (SpatialReference) Destroy ¶
func (sr SpatialReference) Destroy()
Destroy the spatial reference
func (SpatialReference) EPSGTreatsAsLatLong ¶
func (sr SpatialReference) EPSGTreatsAsLatLong() bool
Return true if EPSG feels this coordinate system should be treated as having lat/long coordinate ordering
func (SpatialReference) FromEPSG ¶
func (sr SpatialReference) FromEPSG(code int) error
Initialize SRS based on EPSG code
func (SpatialReference) FromEPSGA ¶
func (sr SpatialReference) FromEPSGA(code int) error
Initialize SRS based on EPSG code, using EPSG lat/long ordering
func (SpatialReference) FromERM ¶
func (sr SpatialReference) FromERM(proj, datum, units string) error
Import coordinate system from ERMapper projection definitions
func (SpatialReference) FromESRI ¶
func (sr SpatialReference) FromESRI(input string) error
Import coordinate system from ESRI .prj formats
func (SpatialReference) FromPCI ¶
func (sr SpatialReference) FromPCI(proj, units string, params []float64) error
Import coordinate system from PCI projection definition
func (SpatialReference) FromProj4 ¶
func (sr SpatialReference) FromProj4(input string) error
Import PROJ.4 coordinate string
func (SpatialReference) FromURL ¶
func (sr SpatialReference) FromURL(url string) error
Import coordinate system from a URL
func (SpatialReference) FromUSGS ¶
func (sr SpatialReference) FromUSGS(projsys, zone int, params []float64, datum int) error
Import coordinate system from USGS projection definition
func (SpatialReference) FromWKT ¶
func (sr SpatialReference) FromWKT(wkt string) error
Initialize SRS based on WKT string
func (SpatialReference) FromXML ¶
func (sr SpatialReference) FromXML(xml string) error
Import coordinate system from XML format (GML only currently)
func (SpatialReference) InverseFlattening ¶
func (sr SpatialReference) InverseFlattening() (float64, error)
Get spheroid inverse flattening axis
func (SpatialReference) IsCompound ¶
func (sr SpatialReference) IsCompound() bool
Return true if compound coordinate system
func (SpatialReference) IsGeocentric ¶
func (sr SpatialReference) IsGeocentric() bool
Return true if geocentric coordinate system
func (SpatialReference) IsGeographic ¶
func (sr SpatialReference) IsGeographic() bool
Return true if geographic coordinate system
func (SpatialReference) IsLocal ¶
func (sr SpatialReference) IsLocal() bool
Return true if local coordinate system
func (SpatialReference) IsProjected ¶
func (sr SpatialReference) IsProjected() bool
Return true if projected coordinate system
func (SpatialReference) IsSame ¶
func (sr SpatialReference) IsSame(other SpatialReference) bool
Return true if the coordinate systems describe the same system
func (SpatialReference) IsSameGeographicCS ¶
func (sr SpatialReference) IsSameGeographicCS(other SpatialReference) bool
Return true if the geographic coordinate systems match
func (SpatialReference) IsSameVerticalCS ¶
func (sr SpatialReference) IsSameVerticalCS(other SpatialReference) bool
Return true if the vertical coordinate systems match
func (SpatialReference) IsVertical ¶
func (sr SpatialReference) IsVertical() bool
Return true if vertical coordinate system
func (SpatialReference) LinearUnits ¶
func (sr SpatialReference) LinearUnits() (string, float64)
Fetch linear projection units
func (SpatialReference) MorphFromESRI ¶
func (sr SpatialReference) MorphFromESRI() error
Convert in place from ESRI WKT format
func (SpatialReference) MorphToESRI ¶
func (sr SpatialReference) MorphToESRI() error
Convert in place to ESRI WKT format
func (SpatialReference) NormalizedProjectionParameter ¶
func (sr SpatialReference) NormalizedProjectionParameter( name string, defaultValue float64, ) (float64, error)
Fetch a normalized projection parameter value
func (SpatialReference) PrimeMeridian ¶
func (sr SpatialReference) PrimeMeridian() (string, float64)
Fetch prime meridian information
func (SpatialReference) ProjectionParameter ¶
func (sr SpatialReference) ProjectionParameter(name string, defaultValue float64) (float64, error)
Fetch a projection parameter value
func (SpatialReference) Reference ¶
func (sr SpatialReference) Reference() int
Increments the reference count by one, returning reference count
func (SpatialReference) Release ¶
func (sr SpatialReference) Release()
Decrements the reference count by one and destroy if zero
func (SpatialReference) SemiMajorAxis ¶
func (sr SpatialReference) SemiMajorAxis() (float64, error)
Get spheroid semi-major axis
func (SpatialReference) SemiMinorAxis ¶
func (sr SpatialReference) SemiMinorAxis() (float64, error)
Get spheroid semi-minor axis
func (SpatialReference) SetACEA ¶
func (sr SpatialReference) SetACEA( stdp1, stdp2, centerLat, centerLong, falseEasting, falseNorthing float64, ) error
Set to Albers Conic Equal Area
func (SpatialReference) SetAE ¶
func (sr SpatialReference) SetAE(centerLat, centerLong, falseEasting, falseNorthing float64) error
Set to Azimuthal Equidistant
func (SpatialReference) SetAngularUnits ¶
func (sr SpatialReference) SetAngularUnits(units string, radians float64) error
Set the angular units for the geographic coordinate system
func (SpatialReference) SetAttrValue ¶
func (sr SpatialReference) SetAttrValue(path, value string) error
Set attribute value in spatial reference
func (SpatialReference) SetAuthority ¶
func (sr SpatialReference) SetAuthority(target, authority string, code int) error
Sets the authority for a node
func (SpatialReference) SetAxisMappingStrategy ¶
func (sr SpatialReference) SetAxisMappingStrategy(strategy AxisMappingStrategy)
func (SpatialReference) SetBonne ¶
func (sr SpatialReference) SetBonne(standardParallel, centralMeridian, falseEasting, falseNorthing float64) error
Set to Bonne
func (SpatialReference) SetCEA ¶
func (sr SpatialReference) SetCEA(stdp1, centralMeridian, falseEasting, falseNorthing float64) error
Set to Cylindrical Equal Area
func (SpatialReference) SetCS ¶
func (sr SpatialReference) SetCS(centerLat, centerLong, falseEasting, falseNorthing float64) error
Set to Cassini-Soldner
func (SpatialReference) SetCompoundCS ¶
func (sr SpatialReference) SetCompoundCS( name string, horizontal, vertical SpatialReference, ) error
Setup a compound coordinate system
func (SpatialReference) SetEC ¶
func (sr SpatialReference) SetEC( stdp1, stdp2, centerLat, centerLong, falseEasting, falseNorthing float64, ) error
Set to Equidistant Conic
func (SpatialReference) SetEckert ¶
func (sr SpatialReference) SetEckert(variation int, centralMeridian, falseEasting, falseNorthing float64) error
Set to Eckert I-VI
func (SpatialReference) SetEquirectangular ¶
func (sr SpatialReference) SetEquirectangular( centerLat, centerLong, falseEasting, falseNorthing float64, ) error
Set to Equirectangular
func (SpatialReference) SetEquirectangularGeneralized ¶
func (sr SpatialReference) SetEquirectangularGeneralized( centerLat, centerLong, psuedoStdParallel, falseEasting, falseNorthing float64, ) error
Set to Equirectangular (generalized form)
func (SpatialReference) SetFromUserInput ¶
func (sr SpatialReference) SetFromUserInput(name string) error
Set spatial reference from various text formats
func (SpatialReference) SetGEOS ¶
func (sr SpatialReference) SetGEOS( centralMeridian, satelliteHeight, falseEasting, falseNorthing float64, ) error
Set to GEOS - Geostationary Satellite View
func (SpatialReference) SetGH ¶
func (sr SpatialReference) SetGH(centralMeridian, falseEasting, falseNorthing float64) error
Set to Goode Homolosine
func (SpatialReference) SetGS ¶
func (sr SpatialReference) SetGS(centralMeridian, falseEasting, falseNorthing float64) error
Set to Gall Stereographic
func (SpatialReference) SetGSTM ¶
func (sr SpatialReference) SetGSTM( centerLat, centerLong, scale, falseEasting, falseNorthing float64, ) error
Set to Gauss Schreiber Transverse Mercator
func (SpatialReference) SetGeocentricCS ¶
func (sr SpatialReference) SetGeocentricCS(name string) error
Set the user visible geographic CS name
func (SpatialReference) SetGeographicCS ¶
func (sr SpatialReference) SetGeographicCS( geogName, datumName, spheroidName string, semiMajor, flattening float64, pmName string, offset float64, angularUnits string, toRadians float64, ) error
Set geographic coordinate system
func (SpatialReference) SetGnomonic ¶
func (sr SpatialReference) SetGnomonic( centerLat, centerLong, falseEasting, falseNorthing float64, ) error
Set to gnomonic
func (SpatialReference) SetHOM ¶
func (sr SpatialReference) SetHOM( centerLat, centerLong, azimuth, rectToSkew, scale, falseEasting, falseNorthing float64, ) error
Set to Hotine Oblique Mercator projection using azimuth angle
func (SpatialReference) SetHOM2PNO ¶
func (sr SpatialReference) SetHOM2PNO( centerLat, lat1, long1, lat2, long2, scale, falseEasting, falseNorthing float64, ) error
Set to Hotine Oblique Mercator projection using two points on projection centerline
func (SpatialReference) SetIGH ¶
func (sr SpatialReference) SetIGH() error
Set to Interrupted Goode Homolosine
func (SpatialReference) SetIWMPolyconic ¶
func (sr SpatialReference) SetIWMPolyconic( lat1, lat2, centerLong, falseEasting, falseNorthing float64, ) error
Set to International Map of the World Polyconic
func (SpatialReference) SetKrovak ¶
func (sr SpatialReference) SetKrovak( centerLat, centerLong, azimuth, psuedoStdParallel, scale, falseEasting, falseNorthing float64, ) error
Set to Krovak Oblique Conic Conformal
func (SpatialReference) SetLAEA ¶
func (sr SpatialReference) SetLAEA( centerLat, centerLong, falseEasting, falseNorthing float64, ) error
Set to Lambert Azimuthal Equal Area
func (SpatialReference) SetLCC ¶
func (sr SpatialReference) SetLCC( stdp1, stdp2, centerLat, centerLong, falseEasting, falseNorthing float64, ) error
Set to Lambert Conformal Conic
func (SpatialReference) SetLCC1SP ¶
func (sr SpatialReference) SetLCC1SP( centerLat, centerLong, scale, falseEasting, falseNorthing float64, ) error
Set to Lambert Conformal Conic (1 standard parallel)
func (SpatialReference) SetLCCB ¶
func (sr SpatialReference) SetLCCB( stdp1, stdp2, centerLat, centerLong, falseEasting, falseNorthing float64, ) error
Set to Lambert Conformal Conic (Belgium)
func (SpatialReference) SetLinearUnits ¶
func (sr SpatialReference) SetLinearUnits(name string, toMeters float64) error
Set the linear units for the projection
func (SpatialReference) SetLinearUnitsAndUpdateParameters ¶
func (sr SpatialReference) SetLinearUnitsAndUpdateParameters(name string, toMeters float64) error
Set the linear units for the target node and update all existing linear parameters
func (SpatialReference) SetLocalCS ¶
func (sr SpatialReference) SetLocalCS(name string) error
Set the user visible local CS name
func (SpatialReference) SetMC ¶
func (sr SpatialReference) SetMC( centerLat, centerLong, falseEasting, falseNorthing float64, ) error
Set to Miller Cylindrical
func (SpatialReference) SetMercator ¶
func (sr SpatialReference) SetMercator( centerLat, centerLong, scale, falseEasting, falseNorthing float64, ) error
Set to Mercator
func (SpatialReference) SetMollweide ¶
func (sr SpatialReference) SetMollweide( centralMeridian, falseEasting, falseNorthing float64, ) error
Set tp Mollweide
func (SpatialReference) SetNZMG ¶
func (sr SpatialReference) SetNZMG( centerLat, centerLong, falseEasting, falseNorthing float64, ) error
Set to New Zealand Map Grid
func (SpatialReference) SetNormalizedProjectionParameter ¶
func (sr SpatialReference) SetNormalizedProjectionParameter(name string, value float64) error
Set a projection parameter with a normalized value
func (SpatialReference) SetOS ¶
func (sr SpatialReference) SetOS( originLat, meridian, scale, falseEasting, falseNorthing float64, ) error
Set to Oblique Stereographic
func (SpatialReference) SetOrthographic ¶
func (sr SpatialReference) SetOrthographic( centerLat, centerLong, falseEasting, falseNorthing float64, ) error
Set to Orthographic
func (SpatialReference) SetPS ¶
func (sr SpatialReference) SetPS( centerLat, centerLong, scale, falseEasting, falseNorthing float64, ) error
Set to Polar Stereographic
func (SpatialReference) SetPolyconic ¶
func (sr SpatialReference) SetPolyconic( centerLat, centerLong, falseEasting, falseNorthing float64, ) error
Set to Polyconic
func (SpatialReference) SetProjectedCS ¶
func (sr SpatialReference) SetProjectedCS(name string) error
Set the user visible projected CS name
func (SpatialReference) SetProjectionByName ¶
func (sr SpatialReference) SetProjectionByName(name string) error
Set a projection by name
func (SpatialReference) SetProjectionParameter ¶
func (sr SpatialReference) SetProjectionParameter(name string, value float64) error
Set a projection parameter value
func (SpatialReference) SetRobinson ¶
func (sr SpatialReference) SetRobinson( centerLong, falseEasting, falseNorthing float64, ) error
Set to Robinson
func (SpatialReference) SetSOC ¶
func (sr SpatialReference) SetSOC( latitudeOfOrigin, centralMeridian, falseEasting, falseNorthing float64, ) error
Set to Swiss Oblique Cylindrical
func (SpatialReference) SetSinusoidal ¶
func (sr SpatialReference) SetSinusoidal( centerLong, falseEasting, falseNorthing float64, ) error
Set to Sinusoidal
func (SpatialReference) SetStatePlane ¶
func (sr SpatialReference) SetStatePlane(zone int, nad83 bool) error
Set State Plane projection definition
func (SpatialReference) SetStatePlaneWithUnits ¶
func (sr SpatialReference) SetStatePlaneWithUnits( zone int, nad83 bool, unitName string, factor float64, ) error
Set State Plane projection definition
func (SpatialReference) SetStereographic ¶
func (sr SpatialReference) SetStereographic( centerLat, centerLong, scale, falseEasting, falseNorthing float64, ) error
Set to Stereographic
func (SpatialReference) SetTM ¶
func (sr SpatialReference) SetTM( centerLat, centerLong, scale, falseEasting, falseNorthing float64, ) error
Set to Transverse Mercator
func (SpatialReference) SetTMG ¶
func (sr SpatialReference) SetTMG( centerLat, centerLong, falseEasting, falseNorthing float64, ) error
Set to Tunisia Mining Grid
func (SpatialReference) SetTMSO ¶
func (sr SpatialReference) SetTMSO( centerLat, centerLong, scale, falseEasting, falseNorthing float64, ) error
Set to Transverse Mercator (South Oriented)
func (SpatialReference) SetTMVariant ¶
func (sr SpatialReference) SetTMVariant( variantName string, centerLat, centerLong, scale, falseEasting, falseNorthing float64, ) error
Set to Transverse Mercator variant
func (SpatialReference) SetTOWGS84 ¶
func (sr SpatialReference) SetTOWGS84(dx, dy, dz, ex, ey, ez, ppm float64) error
Set the Bursa-Wolf conversion to WGS84
func (SpatialReference) SetTargetLinearUnits ¶
func (sr SpatialReference) SetTargetLinearUnits(target, units string, toMeters float64) error
Set the linear units for the target node
func (SpatialReference) SetUTM ¶
func (sr SpatialReference) SetUTM(zone int, north bool) error
Set UTM projection definition
func (SpatialReference) SetVDG ¶
func (sr SpatialReference) SetVDG( centerLong, falseEasting, falseNorthing float64, ) error
Set to VanDerGrinten
func (SpatialReference) SetVerticalCS ¶
func (sr SpatialReference) SetVerticalCS(csName, datumName string, datumType int) error
Set up the vertical coordinate system
func (SpatialReference) SetWellKnownGeographicCS ¶
func (sr SpatialReference) SetWellKnownGeographicCS(name string) error
Set geographic CS based on well known name
func (SpatialReference) TOWGS84 ¶
func (sr SpatialReference) TOWGS84() (coeff [7]float64, err error)
Fetch the TOWGS84 parameters if available
func (SpatialReference) TargetLinearUnits ¶
func (sr SpatialReference) TargetLinearUnits(target string) (string, float64)
Fetch linear units for target
func (SpatialReference) ToMICoordSys ¶
func (sr SpatialReference) ToMICoordSys() (output string, errVal error)
Export coordinate system in Mapinfo style CoordSys format
func (SpatialReference) ToPCI ¶
func (sr SpatialReference) ToPCI() (proj, units string, params []float64, errVal error)
Export coordinate system in PCI format
func (SpatialReference) ToPrettyWKT ¶
func (sr SpatialReference) ToPrettyWKT(simplify bool) (string, error)
Export coordinate system to a nicely formatted WKT string
func (SpatialReference) ToProj4 ¶
func (sr SpatialReference) ToProj4() (string, error)
Export coordinate system in PROJ.4 format
func (SpatialReference) ToUSGS ¶
func (sr SpatialReference) ToUSGS() (proj, zone int, params []float64, datum int, errVal error)
Export coordinate system to USGS GCTP projection definition
func (SpatialReference) ToWKT ¶
func (sr SpatialReference) ToWKT() (string, error)
Export coordinate system to WKT
func (SpatialReference) ToXML ¶
func (sr SpatialReference) ToXML() (xml string, errVal error)
Export coordinate system in XML format
func (SpatialReference) UTMZone ¶
func (sr SpatialReference) UTMZone() (zone int, north bool)
Get UTM zone information
func (SpatialReference) Validate ¶
func (sr SpatialReference) Validate() error
Validate spatial reference tokens
type StyleTable ¶
type StyleTable struct {
// contains filtered or unexported fields
}