Versions in this module Expand all Collapse all v0 v0.1.5 Mar 30, 2022 Changes in this version type ZipWriter + func (w *ZipWriter) SetProjection(s string) error v0.1.4 Nov 5, 2021 v0.1.3 Nov 5, 2021 Changes in this version + var ErrMultipleShpFileInZip = fmt.Errorf("archive does contain multiple .shp files") + var ErrNoShpFileInZip = fmt.Errorf("archive does not contain a .shp file") + type ProviderConfigurator func(*Reader) error + func WithDBF(dbf io.Reader) ProviderConfigurator + func WithSeekableDBF(dbf io.ReadSeeker) ProviderConfigurator type Reader + func New(shp io.Reader, conf ...ProviderConfigurator) (*Reader, error) type ZipReader + func OpenZipFromReadCloser(z *zip.ReadCloser) (*ZipReader, error) + type ZipWriter struct + func NewZipWriter(filename string, t ShapeType) (*ZipWriter, error) + func (w *ZipWriter) Bytes() ([]byte, error) + func (w *ZipWriter) Close() error + func (w *ZipWriter) SetFields(fields []Field) error v0.1.2 Nov 2, 2021 Changes in this version type ShapeType + func (i ShapeType) String() string type ZipReader + func OpenZipReader(z *zip.Reader, c io.Closer) (*ZipReader, error) v0.1.1 Nov 21, 2017 Changes in this version type Writer + func Append(filename string) (*Writer, error) v0.1.0 Oct 28, 2017 Changes in this version + const MULTIPATCH + const MULTIPOINT + const MULTIPOINTM + const MULTIPOINTZ + const NULL + const POINT + const POINTM + const POINTZ + const POLYGON + const POLYGONM + const POLYGONZ + const POLYLINE + const POLYLINEM + const POLYLINEZ + func AttributeCount(sr SequentialReader) int + func Attributes(sr SequentialReader) []string + func ShapesInZip(zipFilePath string) ([]string, error) + type Box struct + MaxX float64 + MaxY float64 + MinX float64 + MinY float64 + func BBoxFromPoints(points []Point) (box Box) + func (b *Box) Extend(box Box) + func (b *Box) ExtendWithPoint(p Point) + type Field struct + Addr [4]byte + Fieldtype byte + Name [11]byte + Padding [14]byte + Precision uint8 + Size uint8 + func DateField(name string) Field + func FloatField(name string, length uint8, precision uint8) Field + func NumberField(name string, length uint8) Field + func StringField(name string, length uint8) Field + func (f Field) String() string + type MultiPatch struct + Box Box + MArray []float64 + MRange [2]float64 + NumParts int32 + NumPoints int32 + PartTypes []int32 + Parts []int32 + Points []Point + ZArray []float64 + ZRange [2]float64 + func (p MultiPatch) BBox() Box + type MultiPoint struct + Box Box + NumPoints int32 + Points []Point + func (p MultiPoint) BBox() Box + type MultiPointM struct + Box Box + MArray []float64 + MRange [2]float64 + NumPoints int32 + Points []Point + func (p MultiPointM) BBox() Box + type MultiPointZ struct + Box Box + MArray []float64 + MRange [2]float64 + NumPoints int32 + Points []Point + ZArray []float64 + ZRange [2]float64 + func (p MultiPointZ) BBox() Box + type Null struct + func (n Null) BBox() Box + type Point struct + X float64 + Y float64 + func (p Point) BBox() Box + type PointM struct + M float64 + X float64 + Y float64 + func (p PointM) BBox() Box + type PointZ struct + M float64 + X float64 + Y float64 + Z float64 + func (p PointZ) BBox() Box + type PolyLine struct + NumParts int32 + NumPoints int32 + Parts []int32 + Points []Point + func NewPolyLine(parts [][]Point) *PolyLine + func (p PolyLine) BBox() Box + type PolyLineM struct + Box Box + MArray []float64 + MRange [2]float64 + NumParts int32 + NumPoints int32 + Parts []int32 + Points []Point + func (p PolyLineM) BBox() Box + type PolyLineZ struct + Box Box + MArray []float64 + MRange [2]float64 + NumParts int32 + NumPoints int32 + Parts []int32 + Points []Point + ZArray []float64 + ZRange [2]float64 + func (p PolyLineZ) BBox() Box + type Polygon PolyLine + func (p Polygon) BBox() Box + type PolygonM PolyLineZ + func (p PolygonM) BBox() Box + type PolygonZ PolyLineZ + func (p PolygonZ) BBox() Box + type Reader struct + GeometryType ShapeType + func Open(filename string) (*Reader, error) + func (r *Reader) Attribute(n int) string + func (r *Reader) AttributeCount() int + func (r *Reader) BBox() Box + func (r *Reader) Close() error + func (r *Reader) Err() error + func (r *Reader) Fields() []Field + func (r *Reader) Next() bool + func (r *Reader) ReadAttribute(row int, field int) string + func (r *Reader) Shape() (int, Shape) + type SequentialReader interface + Attribute func(n int) string + Err func() error + Fields func() []Field + Next func() bool + Shape func() (int, Shape) + func SequentialReaderFromExt(shp, dbf io.ReadCloser) SequentialReader + type Shape interface + BBox func() Box + type ShapeType int32 + type Writer struct + GeometryType ShapeType + func Create(filename string, t ShapeType) (*Writer, error) + func (w *Writer) BBox() Box + func (w *Writer) Close() + func (w *Writer) SetFields(fields []Field) error + func (w *Writer) Write(shape Shape) int32 + func (w *Writer) WriteAttribute(row int, field int, value interface{}) error + type ZipReader struct + func OpenShapeFromZip(zipFilePath string, name string) (*ZipReader, error) + func OpenZip(zipFilePath string) (*ZipReader, error) + func (zr *ZipReader) Attribute(n int) string + func (zr *ZipReader) Close() error + func (zr *ZipReader) Err() error + func (zr *ZipReader) Fields() []Field + func (zr *ZipReader) Next() bool + func (zr *ZipReader) Shape() (int, Shape)