ogr

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
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)
)
View Source
const (
	J_Undefined = Justification(C.OJUndefined)
	J_Left      = Justification(C.OJLeft)
	J_Right     = Justification(C.OJRight)
)
View Source
const (
	GT_Null                  = 4294967295
	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)
)
View Source
const (
	OAMS_TRADITIONAL_GIS_ORDER = AxisMappingStrategy(C.OAMS_TRADITIONAL_GIS_ORDER)
	OAMS_AUTHORITY_COMPLIANT   = AxisMappingStrategy(C.OAMS_AUTHORITY_COMPLIANT)
	OAMS_CUSTOM                = AxisMappingStrategy(C.OAMS_CUSTOM)
)

Variables

View Source
var (
	ErrDebug                   = errors.New("Debug Error")
	ErrNotEnoughData           = errors.New("Not Enough Data Error")
	ErrNotEnoughMemory         = errors.New("Not Enough Memory Error")
	ErrUnsupportedGeometryType = errors.New("Unsupported Geometry Type Error")
	ErrUnsupportedOperation    = errors.New("Unsupported Operation Error")
	ErrCorruptData             = errors.New("Corrupt Data Error")
	ErrFailure                 = errors.New("OGR Failure Error")
	ErrUnsupportedSRS          = errors.New("Unsupported SRS Error")
	ErrInvalidHandle           = errors.New("Invalid Handle Error")
	ErrNonExistingFeature      = errors.New("Non Existing Feature Error")
	ErrUndefined               = errors.New("Undefined Error")
)

Functions

func BoolToCInt

func BoolToCInt(in bool) (out C.int)

Convert a go bool to a C int

func CleanupOGR

func CleanupOGR()

Clean up all OGR related resources

func CleanupSR

func CleanupSR()

Cleanup cached SRS related memory

func IntSliceToCInt

func IntSliceToCInt(data []int) []C.int

func OGRDriverCount

func OGRDriverCount() int

Fetch the number of registered drivers

func OpenDataSourceCount

func OpenDataSourceCount() int

Return the number of opened data sources

Types

type AxisMappingStrategy

type AxisMappingStrategy uint32

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) Transform

func (ct CoordinateTransform) Transform(numPoints int, xPoints []float64, yPoints []float64, zPoints []float64) bool

type DataSource

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

func OpenDataSource

func OpenDataSource(name string, update int) (DataSource, bool)

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, bool)

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) Destroy

func (ds DataSource) Destroy()

Closes datasource and releases resources

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) Name

func (ds DataSource) Name() string

Fetch the name of the 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) Sync

func (ds DataSource) Sync() error

Flush pending changes to the data source

func (DataSource) TestCapability

func (ds DataSource) TestCapability(capability string) bool

Test if the data source has the indicated capability

type Envelope

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

func (Envelope) Contains

func (env Envelope) Contains(other Envelope) bool

Test if one envelope completely contains another

func (Envelope) Intersect

func (env Envelope) Intersect(other Envelope) Envelope

Return the intersection of this envelope with another

func (Envelope) Intersects

func (env Envelope) Intersects(other Envelope) bool

Test if one envelope intersects another

func (Envelope) IsInit

func (env Envelope) IsInit() bool

func (Envelope) MaxX

func (env Envelope) MaxX() float64

func (Envelope) MaxY

func (env Envelope) MaxY() float64

func (Envelope) MinX

func (env Envelope) MinX() float64

func (Envelope) MinY

func (env Envelope) MinY() float64

func (*Envelope) SetMaxX

func (env *Envelope) SetMaxX(val float64)

func (*Envelope) SetMaxY

func (env *Envelope) SetMaxY(val float64)

func (*Envelope) SetMinX

func (env *Envelope) SetMinX(val float64)

func (*Envelope) SetMinY

func (env *Envelope) SetMinY(val float64)

func (Envelope) Union

func (env Envelope) Union(other Envelope) Envelope

Return the union of this envelope with another one

type Feature

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

func (Feature) Clone

func (feature Feature) Clone() Feature

Duplicate feature

func (Feature) Definition

func (feature Feature) Definition() FeatureDefinition

Fetch feature definition

func (Feature) Destroy

func (feature Feature) Destroy()

Destroy this feature

func (Feature) Equal

func (f1 Feature) Equal(f2 Feature) bool

Test if two features are the same

func (Feature) FID

func (feature Feature) FID() int64

Fetch feature indentifier

func (Feature) FieldAsBinary

func (feature Feature) FieldAsBinary(index int) []uint8

Fetch field as binary data

func (Feature) FieldAsDateTime

func (feature Feature) FieldAsDateTime(index int) (time.Time, bool)

Fetch field as date and time

func (Feature) FieldAsFloat64

func (feature Feature) FieldAsFloat64(index int) float64

Fetch field value as float64

func (Feature) FieldAsFloat64List

func (feature Feature) FieldAsFloat64List(index int) []float64

Fetch field as list of float64

func (Feature) FieldAsInteger

func (feature Feature) FieldAsInteger(index int) int

Fetch field value as integer

func (Feature) FieldAsInteger64

func (feature Feature) FieldAsInteger64(index int) int64

Fetch field value as 64-bit integer

func (Feature) FieldAsInteger64List

func (feature Feature) FieldAsInteger64List(index int) []int64

Fetch field as list of 64-bit integers

func (Feature) FieldAsIntegerList

func (feature Feature) FieldAsIntegerList(index int) []int

Fetch field as list of integers

func (Feature) FieldAsString

func (feature Feature) FieldAsString(index int) string

Fetch field value as string

func (Feature) FieldAsStringList

func (feature Feature) FieldAsStringList(index int) []string

Fetch field as list of strings

func (Feature) FieldCount

func (feature Feature) FieldCount() int

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

func (feature Feature) FieldIndex(name string) int

Fetch the field index for the given field name

func (Feature) FillUnsetWithDefault

func (feature Feature) FillUnsetWithDefault(notNullableOnly bool)

Fill unset fields with default values that might be defined. note: papszOptions: unused currently. Must be set to NULL.

func (Feature) Geometry

func (feature Feature) Geometry() Geometry

Fetch geometry of this feature

func (Feature) GeometryField

func (feature Feature) GeometryField(index int) Geometry

Fetch a handle to feature geometry.

func (Feature) GeometryFieldCount

func (feature Feature) GeometryFieldCount() int

Fetch number of geometry fields on this feature This will always be the same as the geometry field count for the OGRFeatureDefn.

func (Feature) GeometryFieldDefition

func (feature Feature) GeometryFieldDefition(index int) GeomFieldDefinition

Fetch definition for this geometry field. index: the field to fetch, from 0 to GetGeomFieldCount()-1.

func (Feature) GeometryFieldIndex

func (feature Feature) GeometryFieldIndex(name string) int

Fetch the geometry field index given geometry field name.

func (Feature) IsFieldNull

func (feature Feature) IsFieldNull(index int) bool

Test if a field is null.

func (Feature) IsFieldSet

func (feature Feature) IsFieldSet(index int) bool

Return if a field has ever been assigned a value

func (Feature) IsFieldSetAndNotNull

func (feature Feature) IsFieldSetAndNotNull(index int) bool

Test if a field is set and not null.

func (Feature) IsNull

func (feature Feature) IsNull() bool

Returns true if this contains a null pointer

func (Feature) NativeData

func (feature Feature) NativeData() string

Returns the native data for the feature.

func (Feature) NativeMediaType

func (feature Feature) NativeMediaType() string

func (Feature) RawField

func (feature Feature) RawField(index int) Field

Fetch a reference to the internal field value

func (Feature) SetFID

func (feature Feature) SetFID(fid int64) error

Set feature identifier

func (Feature) SetFieldDateTime

func (feature Feature) SetFieldDateTime(index int, dt time.Time)

Set field as date / time

func (Feature) SetFieldDateTimeEx

func (feature Feature) SetFieldDateTimeEx(index int, dt time.Time)

Set field as date / time

func (Feature) SetFieldFloat64

func (feature Feature) SetFieldFloat64(index int, value float64)

Set field to float64 value

func (Feature) SetFieldFloat64List

func (feature Feature) SetFieldFloat64List(index int, value []float64)

Set field to list of float64

func (Feature) SetFieldInteger

func (feature Feature) SetFieldInteger(index, value int)

Set field to integer value

func (Feature) SetFieldInteger64

func (feature Feature) SetFieldInteger64(index int, value int64)

Set field to 64-bit integer value

func (Feature) SetFieldInteger64List

func (feature Feature) SetFieldInteger64List(index int, value []int64)

Set field to list of 64-bit integers

func (Feature) SetFieldIntegerList

func (feature Feature) SetFieldIntegerList(index int, value []int)

Set field to list of integers

func (Feature) SetFieldNull

func (feature Feature) SetFieldNull(index int)

Clear a field, marking it as null.

func (Feature) SetFieldRaw

func (feature Feature) SetFieldRaw(index int, field Field)

Set field from the raw field pointer

func (Feature) SetFieldString

func (feature Feature) SetFieldString(index int, value string)

Set field to string value

func (Feature) SetFieldStringList

func (feature Feature) SetFieldStringList(index int, value []string)

Set field to list of strings

func (Feature) SetFrom

func (this Feature) SetFrom(other Feature, forgiving int) error

Set one feature from another

func (Feature) SetFromWithMap

func (this Feature) SetFromWithMap(other Feature, forgiving int, fieldMap []int) error

Set one feature from another, using field map

func (Feature) SetGeometry

func (feature Feature) SetGeometry(geom Geometry) error

Set feature geometry

func (Feature) SetGeometryDirectly

func (feature Feature) SetGeometryDirectly(geom Geometry) error

Set feature geometry, passing ownership to the feature

func (Feature) SetGeometryField

func (feature Feature) SetGeometryField(index int, geom Geometry) error

Set feature geometry of a specified geometry field. This function updates the features geometry, and operate exactly as SetGeometryDirectly(),

except that this function does not assume ownership of the passed geometry, but instead makes a copy of it.

func (Feature) SetGeometryFieldDirectly

func (feature Feature) SetGeometryFieldDirectly(index int, geom Geometry) error

Set feature geometry of a specified geometry field. This function updates the features geometry, and operate exactly as SetGeomField(),

except that this function assumes ownership of the passed geometry (even in case of failure of that function).

func (Feature) SetNativeData

func (feature Feature) SetNativeData(nativeData string)

func (Feature) SetNativeMediaType

func (feature Feature) SetNativeMediaType(mediatype string)

func (Feature) SetStyleString

func (feature Feature) SetStyleString(style string)

Set style string for this feature

func (Feature) StealGeometry

func (feature Feature) StealGeometry() Geometry

Fetch geometry of this feature and assume ownership

func (Feature) StlyeString

func (feature Feature) StlyeString() string

Fetch style string for this feature

func (Feature) UnnsetField

func (feature Feature) UnnsetField(index int)

Clear a field and mark it as unset

func (Feature) Validate

func (feature Feature) Validate(validateFlags int, emitError int) int

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) AddGeomFieldDefinition

func (fd FeatureDefinition) AddGeomFieldDefinition(gdf GeomFieldDefinition)

Add a new field definition to the passed 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) DeleteGeomFieldDefinition

func (fd FeatureDefinition) DeleteGeomFieldDefinition(index int) error

Delete an existing geometry field 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) GeomFieldCount

func (fd FeatureDefinition) GeomFieldCount() int

Fetch number of geometry fields on the passed feature definition.

func (FeatureDefinition) GeomFieldIndex

func (fd FeatureDefinition) GeomFieldIndex(name string) int

Find geometry field by name.

func (FeatureDefinition) GeometryType

func (fd FeatureDefinition) GeometryType() GeometryType

Fetch the geometry base type of this feature definition

func (FeatureDefinition) GetGeomFieldDefinition

func (fd FeatureDefinition) GetGeomFieldDefinition(index int) GeomFieldDefinition

Fetch geometry field definition of the passed feature definition.

func (FeatureDefinition) IsGeometryIgnored

func (fd FeatureDefinition) IsGeometryIgnored() bool

Fetch if the geometry can be ignored when fetching features

func (FeatureDefinition) IsSame

func (fd FeatureDefinition) IsSame(fd2 FeatureDefinition) bool

Test if the feature definition is identical to the other one.

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) ReorderFieldDefinitions

func (fd FeatureDefinition) ReorderFieldDefinitions(panmap []int) error

OGRErrOGR_FD_ReorderFieldDefns(OGRFeatureDefnHhDefn, int *panMap)

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 Field

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

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) Destroy

func (fd FieldDefinition) Destroy()

Destroy the field definition

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) Name

func (fd FieldDefinition) Name() string

Fetch the name of the 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) 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 FieldType

type FieldType int

List of well known binary geometry types

func (FieldType) Name

func (ft FieldType) Name() string

Fetch human readable name for the field type

type GeomFieldDefinition

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

--------------------------------------------------------------------

Geometry Field definition functions

--------------------------------------------------------------------

func CreateGeomFieldDefinition

func CreateGeomFieldDefinition(name string, geomType GeometryType) GeomFieldDefinition

OGRGeomFieldDefn(const char *pszNameIn, OGRwkbGeometryTypeeGeomTypeIn)

func (GeomFieldDefinition) Destroy

func (gfd GeomFieldDefinition) Destroy()

Destroy the geom field definition

func (GeomFieldDefinition) FieldIsIngored

func (gfd GeomFieldDefinition) FieldIsIngored() bool

Return whether this field should be omitted when fetching features.

func (GeomFieldDefinition) IsNullable

func (gfd GeomFieldDefinition) IsNullable() bool

Return whether this geometry field can receive null values.

func (GeomFieldDefinition) Name

func (gfd GeomFieldDefinition) Name() string

Fetch the name of the geom field

func (GeomFieldDefinition) SetFieldIgnored

func (gfd GeomFieldDefinition) SetFieldIgnored(isIgnored bool)

Set whether this field should be omitted when fetching features.

func (GeomFieldDefinition) SetName

func (gfd GeomFieldDefinition) SetName(name string)

Set the name of the geom field

func (GeomFieldDefinition) SetNullable

func (gfd GeomFieldDefinition) SetNullable(isNullable bool)

Set whether this geometry field can receive null values.

func (GeomFieldDefinition) SetSpatialReference

func (gfd GeomFieldDefinition) SetSpatialReference(sr SpatialReference)

Set the spatial reference of this field.

func (GeomFieldDefinition) SetType

func (gfd GeomFieldDefinition) SetType(geomType GeometryType)

Set the type of this geom field

func (GeomFieldDefinition) SpatialReference

func (gfd GeomFieldDefinition) SpatialReference() SpatialReference

Fetch spatial reference system of this field.

func (GeomFieldDefinition) Type

func (gfd GeomFieldDefinition) Type() GeometryType

Fetch the type of this geom 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

func CreateFromGML(gml string) Geometry

Create a geometry from its GML representation

func CreateFromJson

func CreateFromJson(_json string) Geometry

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

func (geom Geometry) AddGeometry(other Geometry) error

Add a geometry to a geometry container

func (Geometry) AddGeometryDirectly

func (geom Geometry) AddGeometryDirectly(other Geometry) error

Add a geometry to a geometry container and assign ownership to that container

func (Geometry) AddPoint

func (geom Geometry) AddPoint(x, y, z float64)

Add a new point to the geometry (line string or polygon only)

func (Geometry) AddPoint2D

func (geom Geometry) AddPoint2D(x, y float64)

Add a new point to the geometry (line string or polygon only), ignoring the 3rd dimension

func (Geometry) Area

func (geom Geometry) Area() float64

Compute area of geometry

func (Geometry) Boundary

func (geom Geometry) Boundary() Geometry

Compute boundary for the geometry

func (Geometry) Buffer

func (geom Geometry) Buffer(distance float64, segments int) Geometry

Compute buffer of the geometry

func (Geometry) BuildPolygonFromEdges

func (geom Geometry) BuildPolygonFromEdges(autoClose bool, tolerance float64) (Geometry, error)

Build a polygon / ring from a set of lines

func (Geometry) Centroid

func (geom Geometry) Centroid() Geometry

Compute centroid of geometry

func (Geometry) Clone

func (geom Geometry) Clone() Geometry

Create a copy of this geometry

func (Geometry) CloseRings

func (geom Geometry) CloseRings()

Force rings to be closed

func (Geometry) Contains

func (geom Geometry) Contains(other Geometry) bool

Return true if this geometry contains the other

func (Geometry) ConvexHull

func (geom Geometry) ConvexHull() Geometry

Compute convex hull for the geometry

func (Geometry) CoordinateDimension

func (geom Geometry) CoordinateDimension() int

Get the dimension of the coordinates in this geometry

func (Geometry) Crosses

func (geom Geometry) Crosses(other Geometry) bool

Return true if this feature crosses the other

func (Geometry) Destroy

func (geometry Geometry) Destroy()

Destroy geometry object

func (Geometry) Difference

func (geom Geometry) Difference(other Geometry) Geometry

Compute difference between this geometry and the other

func (Geometry) Dimension

func (geom Geometry) Dimension() int

Get the dimension of this geometry

func (Geometry) Disjoint

func (geom Geometry) Disjoint(other Geometry) bool

Return true if the features are disjoint

func (Geometry) Distance

func (geom Geometry) Distance(other Geometry) float64

Compute distance between thie geometry and the other

func (Geometry) Distance3D

func (geom Geometry) Distance3D(other Geometry) float64

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) Empty

func (geom Geometry) Empty()

Clear the geometry to its uninitialized state

func (Geometry) Envelope

func (geom Geometry) Envelope() Envelope

Compute and return the bounding envelope for this geometry

func (Geometry) Equals

func (geom Geometry) Equals(other Geometry) bool

Return true if these features are equal

func (Geometry) FlattenTo2D

func (geom Geometry) FlattenTo2D()

Convert geometry to strictly 2D

func (Geometry) ForceToMultiLineString

func (geom Geometry) ForceToMultiLineString() Geometry

Convert to multilinestring

func (Geometry) ForceToMultiPoint

func (geom Geometry) ForceToMultiPoint() Geometry

Convert to multipoint

func (Geometry) ForceToMultiPolygon

func (geom Geometry) ForceToMultiPolygon() Geometry

Convert to multipolygon

func (Geometry) ForceToPolygon

func (geom Geometry) ForceToPolygon() Geometry

Convert to polygon

func (Geometry) FromWKB

func (geom Geometry) FromWKB(wkb []uint8, bytes int) error

Assign a geometry from well known binary data

func (Geometry) FromWKT

func (geom Geometry) FromWKT(wkt string) error

Assign geometry object from its well known text representation

func (Geometry) Geometry

func (geom Geometry) Geometry(index int) Geometry

Fetch geometry from a geometry container

func (Geometry) GeometryCount

func (geom Geometry) GeometryCount() int

Fetch the number of elements in the geometry, or number of geometries in the container

func (Geometry) Intersection

func (geom Geometry) Intersection(other Geometry) Geometry

Compute intersection of this geometry with the other

func (Geometry) Intersects

func (geom Geometry) Intersects(other Geometry) bool

Return true if these features intersect

func (Geometry) IsEmpty

func (geom Geometry) IsEmpty() bool

Test if the geometry is empty

func (Geometry) IsNull

func (geom Geometry) IsNull() bool

Test if the geometry is null

func (Geometry) IsRing

func (geom Geometry) IsRing() bool

Test if the geometry is a ring

func (Geometry) IsSimple

func (geom Geometry) IsSimple() bool

Test if the geometry is simple

func (Geometry) IsValid

func (geom Geometry) IsValid() bool

Test if the geometry is valid

func (Geometry) Length

func (geom Geometry) Length() float64

Compute length of geometry

func (Geometry) Name

func (geom Geometry) Name() string

Fetch geometry name

func (Geometry) Overlaps

func (geom Geometry) Overlaps(other Geometry) bool

Return true if this geometry overlaps the other

func (Geometry) Point

func (geom Geometry) Point(index int) (x, y, z float64)

Fetch the coordinates of a point in the geometry

func (Geometry) PointCount

func (geom Geometry) PointCount() int

Fetch number of points in the geometry

func (Geometry) Polygonize

func (geom Geometry) Polygonize() Geometry

Polygonize a set of sparse edges

func (Geometry) RemoveGeometry

func (geom Geometry) RemoveGeometry(index int, delete bool) error

Remove a geometry from the geometry container

func (Geometry) Segmentize

func (geom Geometry) Segmentize(distance float64)

Modify the geometry such that it has no line segment longer than the given distance

func (Geometry) SetCoordinateDimension

func (geom Geometry) SetCoordinateDimension(dim int)

Set the dimension of the coordinates in this geometry

func (Geometry) SetPoint

func (geom Geometry) SetPoint(index int, x, y, z float64)

Set the coordinates of a point in the geometry

func (Geometry) SetPoint2D

func (geom Geometry) SetPoint2D(index int, x, y float64)

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) Simplify

func (geom Geometry) Simplify(tolerance float64) Geometry

Simplify the geometry

func (Geometry) SimplifyPreservingTopology

func (geom Geometry) SimplifyPreservingTopology(tolerance float64) Geometry

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

func (geom Geometry) SymmetricDifference(other Geometry) Geometry

Compute symmetric difference between this geometry and the other

func (Geometry) ToGML

func (geom Geometry) ToGML() string

Convert a geometry to GML format

func (Geometry) ToGML_Ex

func (geom Geometry) ToGML_Ex(options []string) string

Convert a geometry to GML format with options

func (Geometry) ToJSON

func (geom Geometry) ToJSON() string

Convert a geometry to JSON format

func (Geometry) ToJSON_ex

func (geom Geometry) ToJSON_ex(options []string) string

Convert a geometry to JSON format with options

func (Geometry) ToKML

func (geom Geometry) ToKML() string

Convert a geometry to KML format

func (Geometry) ToWKB

func (geom Geometry) ToWKB() ([]uint8, error)

Convert a geometry to well known binary data

func (Geometry) ToWKT

func (geom Geometry) ToWKT() (string, error)

Fetch geometry as WKT

func (Geometry) Touches

func (geom Geometry) Touches(other Geometry) bool

Return true if this feature touches 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) Type

func (geom Geometry) Type() GeometryType

Fetch geometry type

func (Geometry) Union

func (geom Geometry) Union(other Geometry) Geometry

Compute union of this geometry with the other

func (Geometry) UnionCascaded

func (geom Geometry) UnionCascaded() Geometry

func (Geometry) WKBSize

func (geom Geometry) WKBSize() int

Returns size of related binary representation

func (Geometry) Within

func (geom Geometry) Within(other Geometry) bool

Return true if this geometry is within the other

func (Geometry) X

func (geom Geometry) X(index int) float64

Fetch the X coordinate of a point in the geometry

func (Geometry) Y

func (geom Geometry) Y(index int) float64

Fetch the Y coordinate of a point in the geometry

func (Geometry) Z

func (geom Geometry) Z(index int) float64

Fetch the Z coordinate of a point in the geometry

type GeometryType

type GeometryType uint32

List of well known binary geometry types

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

func (layer Layer) CommitTransaction() error

Commit a transaction on data sources which support it Note: as of GDAL 2.0, use of this API is discouraged when the dataset offers dataset level transaction with GDALDataset::StartTransaction().

func (Layer) Create

func (layer Layer) Create(feature Feature) error

Create and write a new feature within a layer

func (Layer) CreateField

func (layer Layer) CreateField(fd FieldDefinition, approxOK bool) error

Create a new field on a layer

func (Layer) CreateGeomField

func (layer Layer) CreateGeomField(fd FieldDefinition, approxOK bool) error

Create a new geometry field on a layer

func (Layer) Definition

func (layer Layer) Definition() FeatureDefinition

Fetch the schema information for this layer

func (Layer) Delete

func (layer Layer) Delete(index int64) error

Delete indicated feature from layer

func (Layer) DeleteField

func (layer Layer) DeleteField(index int) error

Delete a field from the layer

func (Layer) Extent

func (layer Layer) Extent(force bool) (env Envelope, err error)

Fetch the extent of this layer

func (Layer) ExtentEx

func (layer Layer) ExtentEx(index int, force bool) (env Envelope, err error)

Fetch the extent of this layer on the spacified geometry field

func (Layer) FIDColumn

func (layer Layer) FIDColumn() string

Fetch the name of the FID column

func (Layer) Feature

func (layer Layer) Feature(index int64) Feature

Fetch a feature by its index

func (Layer) FeatureCount

func (layer Layer) FeatureCount(force bool) (count int, ok bool)

Fetch the feature count for this layer

func (Layer) FindFieldIndex

func (layer Layer) FindFieldIndex(field string, exactMatch bool) int

Gets the index for a field name

func (Layer) GeometryColumn

func (layer Layer) GeometryColumn() string

Fetch the name of the geometry column

func (Layer) IsNull

func (layer Layer) IsNull() bool

test for null geometry

func (Layer) Name

func (layer Layer) Name() string

Return the layer name

func (Layer) NextFeature

func (layer Layer) NextFeature() *Feature

Fetch the next available feature from this layer

func (Layer) ReorderField

func (layer Layer) ReorderField(oldIndex, newIndex int) error

Reorder an existing field of a layer

func (Layer) ReorderFields

func (layer Layer) ReorderFields(layerMap []int) error

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

func (layer Layer) RollbackTransaction() error

Roll back the current transaction on data sources which support it Note: as of GDAL 2.0, use of this API is discouraged when the dataset offers dataset level transaction with GDALDataset::StartTransaction().

func (Layer) SetAttributeFilter

func (layer Layer) SetAttributeFilter(filter string) error

Set a new attribute query filter

func (Layer) SetFeature

func (layer Layer) SetFeature(feature Feature) error

Rewrite the provided feature

func (Layer) SetIgnoredFields

func (layer Layer) SetIgnoredFields(names []string) error

Set which fields can be ignored when retrieving features from the layer

func (Layer) SetNextByIndex

func (layer Layer) SetNextByIndex(index int64) error

Move read cursor to the provided index

func (Layer) SetSpatialFilter

func (layer Layer) SetSpatialFilter(filter Geometry)

Set a new spatial filter for this layer

func (Layer) SetSpatialFilterEx

func (layer Layer) SetSpatialFilterEx(index int, filter Geometry)

Set a new spatial filter for this layer and field

func (Layer) SetSpatialFilterRect

func (layer Layer) SetSpatialFilterRect(minX, minY, maxX, maxY float64)

Set a new rectangular spatial filter for this layer

func (Layer) SetSpatialFilterRectEx

func (layer Layer) SetSpatialFilterRectEx(index int, minX, minY, maxX, maxY float64)

Set a new rectangular spatial filter for this layer

func (Layer) SpatialFilter

func (layer Layer) SpatialFilter() Geometry

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

func (layer Layer) StartTransaction() error

Begin a transation on data sources which support it Note: as of GDAL 2.0, use of this API is discouraged when the dataset offers dataset level transaction with GDALDataset::StartTransaction().

func (Layer) Sync

func (layer Layer) Sync() error

Flush pending changes to the layer

func (Layer) TestCapability

func (layer Layer) TestCapability(capability string) bool

Test if this layer supports the named capability

func (Layer) Type

func (layer Layer) Type() GeometryType

Return the layer geometry type

type OGRDriver

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

func OGRDriverByIndex

func OGRDriverByIndex(index int) OGRDriver

Fetch the indicated driver by index

func OGRDriverByName

func OGRDriverByName(name string) OGRDriver

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) Delete

func (driver OGRDriver) Delete(filename string) error

Delete a data source

func (OGRDriver) Deregister

func (driver OGRDriver) Deregister()

Remove a driver from the list of registered drivers

func (OGRDriver) Name

func (driver OGRDriver) Name() string

Fetch name of driver (file format)

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

func (driver OGRDriver) TestCapability(capability string) bool

Test if this driver supports the named capability

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

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) GetAxisMappingStrategy

func (sr SpatialReference) GetAxisMappingStrategy() AxisMappingStrategy

func (SpatialReference) GetPointer

func (sr SpatialReference) GetPointer() C.OGRSpatialReferenceH

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(ams 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 StyleMgr

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

type StyleTable

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

type StyleTool

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

Jump to

Keyboard shortcuts

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