Documentation ¶
Index ¶
- Constants
- Variables
- func BoolToCInt(in bool) (out C.int)
- func CleanupOGR()
- func CleanupSR()
- func IntSliceToCInt(data []int) []C.int
- func OGRDriverCount() int
- func OpenDataSourceCount() int
- type AxisMappingStrategy
- 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 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 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) FillUnsetWithDefault(notNullableOnly bool)
- func (feature Feature) Geometry() Geometry
- func (feature Feature) GeometryField(index int) Geometry
- func (feature Feature) GeometryFieldCount() int
- func (feature Feature) GeometryFieldDefition(index int) GeomFieldDefinition
- func (feature Feature) GeometryFieldIndex(name string) int
- func (feature Feature) IsFieldNull(index int) bool
- func (feature Feature) IsFieldSet(index int) bool
- func (feature Feature) IsFieldSetAndNotNull(index int) bool
- func (feature Feature) IsNull() bool
- func (feature Feature) NativeData() string
- func (feature Feature) NativeMediaType() string
- func (feature Feature) RawField(index int) Field
- func (feature Feature) SetFID(fid int64) error
- func (feature Feature) SetFieldDateTime(index int, dt time.Time)
- func (feature Feature) SetFieldDateTimeEx(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) SetFieldNull(index 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) SetGeometryField(index int, geom Geometry) error
- func (feature Feature) SetGeometryFieldDirectly(index int, geom Geometry) error
- func (feature Feature) SetNativeData(nativeData string)
- func (feature Feature) SetNativeMediaType(mediatype string)
- func (feature Feature) SetStyleString(style string)
- func (feature Feature) StealGeometry() Geometry
- func (feature Feature) StlyeString() string
- func (feature Feature) UnnsetField(index int)
- func (feature Feature) Validate(validateFlags int, emitError int) int
- type FeatureDefinition
- func (fd FeatureDefinition) AddFieldDefinition(fieldDefn FieldDefinition)
- func (fd FeatureDefinition) AddGeomFieldDefinition(gdf GeomFieldDefinition)
- func (fd FeatureDefinition) Create() Feature
- func (fd FeatureDefinition) DeleteFieldDefinition(index int) error
- func (fd FeatureDefinition) DeleteGeomFieldDefinition(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) GeomFieldCount() int
- func (fd FeatureDefinition) GeomFieldIndex(name string) int
- func (fd FeatureDefinition) GeometryType() GeometryType
- func (fd FeatureDefinition) GetGeomFieldDefinition(index int) GeomFieldDefinition
- func (fd FeatureDefinition) IsGeometryIgnored() bool
- func (fd FeatureDefinition) IsSame(fd2 FeatureDefinition) 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) ReorderFieldDefinitions(panmap []int) error
- 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) 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) 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 GeomFieldDefinition
- func (gfd GeomFieldDefinition) Destroy()
- func (gfd GeomFieldDefinition) FieldIsIngored() bool
- func (gfd GeomFieldDefinition) IsNullable() bool
- func (gfd GeomFieldDefinition) Name() string
- func (gfd GeomFieldDefinition) SetFieldIgnored(isIgnored bool)
- func (gfd GeomFieldDefinition) SetName(name string)
- func (gfd GeomFieldDefinition) SetNullable(isNullable bool)
- func (gfd GeomFieldDefinition) SetSpatialReference(sr SpatialReference)
- func (gfd GeomFieldDefinition) SetType(geomType GeometryType)
- func (gfd GeomFieldDefinition) SpatialReference() SpatialReference
- func (gfd GeomFieldDefinition) Type() GeometryType
- 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) 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 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) CreateGeomField(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) ExtentEx(index int, 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) FindFieldIndex(field string, exactMatch bool) int
- func (layer Layer) GeometryColumn() string
- func (layer Layer) IsNull() bool
- 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) SetSpatialFilterEx(index int, filter Geometry)
- func (layer Layer) SetSpatialFilterRect(minX, minY, maxX, maxY float64)
- func (layer Layer) SetSpatialFilterRectEx(index int, 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 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 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) GetAxisMappingStrategy() AxisMappingStrategy
- func (sr SpatialReference) GetPointer() C.OGRSpatialReferenceH
- 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(ams 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
Constants ¶
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 ( 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) )
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 ¶
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 IntSliceToCInt ¶
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
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) 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 Envelope ¶
type Envelope struct {
// contains filtered or unexported fields
}
func (Envelope) Intersects ¶
Test if one envelope intersects another
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) FillUnsetWithDefault ¶
Fill unset fields with default values that might be defined. note: papszOptions: unused currently. Must be set to NULL.
func (Feature) GeometryField ¶
Fetch a handle to feature geometry.
func (Feature) GeometryFieldCount ¶
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 ¶
Fetch the geometry field index given geometry field name.
func (Feature) IsFieldNull ¶
Test if a field is null.
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) NativeData ¶
Returns the native data for the feature.
func (Feature) NativeMediaType ¶
func (Feature) SetFieldDateTime ¶
Set field as date / time
func (Feature) SetFieldDateTimeEx ¶
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) SetFieldNull ¶
Clear a field, marking it as null.
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) SetGeometryField ¶
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 ¶
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) SetNativeMediaType ¶
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) 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 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) 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) 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 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 ¶
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) 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 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 Note: as of GDAL 2.0, use of this API is discouraged when the dataset offers dataset level transaction with GDALDataset::StartTransaction().
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) DeleteField ¶
Delete a field from the layer
func (Layer) FeatureCount ¶
Fetch the feature count for this layer
func (Layer) FindFieldIndex ¶
Gets the index for a field name
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 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 ¶
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) SetSpatialFilterEx ¶
Set a new spatial filter for this layer and field
func (Layer) SetSpatialFilterRect ¶
Set a new rectangular spatial filter for this layer
func (Layer) SetSpatialFilterRectEx ¶
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 Note: as of GDAL 2.0, use of this API is discouraged when the dataset offers dataset level transaction with GDALDataset::StartTransaction().
func (Layer) TestCapability ¶
Test if this layer supports the named capability
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 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) 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 StyleTable ¶
type StyleTable struct {
// contains filtered or unexported fields
}