Documentation ¶
Index ¶
- Constants
- type BBox
- type Header
- type MData
- type MultiPatch
- type MultiPoint
- type MultiPointM
- type MultiPointZ
- type Null
- type PartType
- type Point
- type PointM
- type PointZ
- type Polygon
- type PolygonM
- type PolygonZ
- type Polyline
- type PolylineM
- type PolylineZ
- type Range
- type Reader
- type Shape
- type ShapeType
Constants ¶
const ( // TypeNull indicates Null TypeNull = 0 // TypePoint indicates Point TypePoint = 1 // TypePolyline indicates Polyline TypePolyline = 3 // TypePolygon indicates Polygon TypePolygon = 5 // TypeMultiPoint indicates MultiPoint TypeMultiPoint = 8 // TypePointZ indicates PointZ TypePointZ = 11 // TypePolylineZ indicates PolylineZ TypePolylineZ = 13 // TypePolygonZ indicates PolygonZ TypePolygonZ = 15 // TypeMultiPointZ indicates MultiPointZ TypeMultiPointZ = 18 // TypePointM indicates PointM TypePointM = 21 // TypePolylineM indicates PolylineM TypePolylineM = 23 // TypePolygonM indicates PolygonM TypePolygonM = 25 // TypeMultiPointM indicates MultiPointM TypeMultiPointM = 28 // TypeMultiPatch indicates MultiPatch TypeMultiPatch = 31 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BBox ¶
type BBox struct {
MinX, MinY, MaxX, MaxY float64
}
BBox is the bounding box for an associated shape.
type MultiPatch ¶
type MultiPatch struct { BBox BBox NumberOfParts int32 NumberOfPoints int32 Parts []int32 PartTypes []PartType Points []Point ZRange Range Z []float64 MData }
MultiPatch consists of a number of surface patches. Each surface patch describes a surface. The surface patches of a MultiPatch are referred to as its parts, and the type ofpart controls how the order of vertices of an MultiPatch part is interpreted.
type MultiPoint ¶
MultiPoint represents a set of points.
type MultiPointM ¶
MultiPointM represents a set of PointMs. Note that the M data is optional and missing values are specified with NaN.
type MultiPointZ ¶
type MultiPointZ struct { BBox BBox NumberOfPoints int32 Points []Point ZRange Range Z []float64 MData }
MultiPointZ represents a set of PointZs.
type Null ¶
type Null struct{}
Null indicates a shape with no geometric data. Each feature type (point, line, polygon, etc.) supports nulls. It is valid to have points and null points in the same shapefile.
type PartType ¶
type PartType int32
PartType ...
const ( // TriangleStrip indicates the part is a linked strip of triangles, // where every vertex (after the first two) completes a new triangle. // A new triangle is always formed byconnecting the new vertex with // its two immediate predecessors. TriangleStrip PartType = 0 // TriangleFan indicates the part is a linked fan of triangles, // where every vertex (after the first two) completes a new triangle. // A new triangle is always formed byconnecting the new vertex with // its immediate predecessor and thefirst vertex of the part TriangleFan PartType = 1 // OuterRing indicates the part is the outer ring of a polygon. OuterRing PartType = 2 // InnerRing indicates the part is a hole in a polygon. InnerRing PartType = 3 // FirstRing indicates the part is the first ring of a polygon of // unspecified type. FirstRing PartType = 4 // Ring indicates the part is a ring of a polygon of unspecified type. Ring PartType = 5 )
type Point ¶
type Point struct {
X, Y float64
}
Point consists of a pair of double-precision coordinates in the order X,Y.
type PointZ ¶
type PointZ struct {
X, Y, Z, M float64
}
PointZ is a triplet of double-precision coordinates in the order X,Y,Z, plus a measure.
type Polygon ¶
type Polygon struct { BBox BBox NumberOfParts int32 NumberOfPoints int32 Parts []int32 Points []Point }
Polygon consists of one or more rings. A ring is a connected sequence of four or more points that form a closed, non-self-intersecting loop. A polygon may contain multiple outer rings. The order of vertices or orientation for a ring indicates which side of the ring is the interior of the polygon. The neighborhood to the right of an observer walking along the ring in vertex order is the neighborhood inside the polygon. Vertices of rings defining holes in polygons are in a counterclockwise direction. Vertices for a single, ringed polygon are, therefore, always in clockwise order. The rings of a polygon are referred to as its parts.
type PolygonM ¶
type PolygonM struct { BBox BBox NumberOfParts int32 NumberOfPoints int32 Parts []int32 Points []Point MData }
PolygonM is a Polygon with optional measure (M) data. Missing M data is specified as NaN.
type PolygonZ ¶
type PolygonZ struct { BBox BBox NumberOfParts int32 NumberOfPoints int32 Parts []int32 Points []Point ZRange Range Z []float64 MData }
PolygonZ represents a polygon in the order X,Y,Z with optional associated measure (M) data. Missing M data is indicated with NaN.
type Polyline ¶
type Polyline struct { BBox BBox NumberOfParts int32 NumberOfPoints int32 Parts []int32 Points []Point }
Polyline is an ordered set of vertices that consists of one or more parts. A part is a connected sequence of two or more points. Parts may or may not be connected to one another. Parts may or may not intersect one another.
type PolylineM ¶
type PolylineM struct { BBox BBox NumberOfParts int32 NumberOfPoints int32 Parts []int32 Points []Point MData }
PolylineM is a Polyline with optional measure (M) data. Missing M data is specified as NaN.
type PolylineZ ¶
type PolylineZ struct { BBox BBox NumberOfParts int32 NumberOfPoints int32 Parts []int32 Points []Point ZRange Range Z []float64 MData }
PolylineZ represents a polyline in the order X,Y,Z with optional associated measure (M) data. Missing M data is indicated with NaN.