Versions in this module Expand all Collapse all v0 v0.0.1 Feb 6, 2024 Changes in this version + func NoData(x float64) bool + func TrimTrailingZeros(data []byte) []byte + type CPG struct + Charset string + func ReadCPG(r io.Reader, _ int64) (*CPG, error) + func ReadCPGZipFile(zipFile *zip.File) (*CPG, error) + type DBF struct + FieldDescriptors []*DBFFieldDescriptor + Records [][]any + func ReadDBF(r io.Reader, _ int64, options *ReadDBFOptions) (*DBF, error) + func ReadDBFZipFile(zipFile *zip.File, options *ReadDBFOptions) (*DBF, error) + func (d *DBF) Record(i int) map[string]any + type DBFFieldDescriptor struct + DecimalCount int + Length int + Name string + SetFields byte + Type byte + WorkAreaID byte + func (d *DBFFieldDescriptor) ParseRecord(data []byte, decoder *encoding.Decoder) (any, error) + type DBFHeader struct + DBT bool + HeaderSize int + LastUpdate time.Time + Memo bool + RecordSize int + Records int + Version int + func ParseDBFHeader(data []byte, options *ReadDBFOptions) (*DBFHeader, error) + type DBFMemo string + type DBFRecord = []any + type PRJ struct + Projection string + func ReadPRJ(r io.Reader, _ int64) (*PRJ, error) + func ReadPRJZipFile(zipFile *zip.File) (*PRJ, error) + type ReadDBFOptions struct + Charset string + MaxHeaderSize int + MaxRecordSize int + MaxRecords int + type ReadSHPOptions struct + MaxParts int + MaxPoints int + MaxRecordSize int + type ReadShapefileOptions struct + DBF *ReadDBFOptions + SHP *ReadSHPOptions + type SHP struct + Records []*SHPRecord + func ReadSHP(r io.Reader, fileLength int64, options *ReadSHPOptions) (*SHP, error) + func ReadSHPZipFile(zipFile *zip.File, options *ReadSHPOptions) (*SHP, error) + func (s *SHP) Record(i int) geom.T + type SHPRecord struct + Bounds *geom.Bounds + ContentLength int + Geom geom.T + Number int + ShapeType ShapeType + func ReadSHPRecord(r io.Reader, options *ReadSHPOptions) (*SHPRecord, error) + type SHX struct + Records []SHXRecord + func ReadSHX(r io.Reader, size int64) (*SHX, error) + func ReadSHXZipFile(zipFile *zip.File) (*SHX, error) + type SHXRecord struct + ContentLength int + Offset int + func ParseSHXRecord(data []byte) SHXRecord + type SHxHeader struct + Bounds *geom.Bounds + ShapeType ShapeType + type Scanner struct + func NewScanner(readers map[string]io.ReadCloser, sizes map[string]int64, ...) (*Scanner, error) + func NewScannerFromBasename(basename string, options *ReadShapefileOptions) (*Scanner, error) + func NewScannerFromZipFile(name string, options *ReadShapefileOptions) (*Scanner, error) + func NewScannerFromZipReader(zipReader *zip.Reader, options *ReadShapefileOptions) (*Scanner, error) + func (s *Scanner) Close() error + func (s *Scanner) DBFFieldDescriptors() []*DBFFieldDescriptor + func (s *Scanner) DBFHeader() *DBFHeader + func (s *Scanner) Discard(n int) (int, error) + func (s *Scanner) Next() bool + func (s *Scanner) SHPHeader() *SHxHeader + func (s *Scanner) SHxHeader() *SHxHeader + func (s *Scanner) Scan() (recordSHP *SHPRecord, recordSHX *SHXRecord, recordDBF DBFRecord) + func (s Scanner) Charset() string + func (s Scanner) Error() error + func (s Scanner) EstimatedRecords() int64 + func (s Scanner) Projection() string + func (s Scanner) ScannedRecords() int64 + type ScannerDBF struct + func NewScannerDBF(reader io.ReadCloser, options *ReadDBFOptions) (*ScannerDBF, error) + func (s *ScannerDBF) FieldDescriptors() []*DBFFieldDescriptor + func (s *ScannerDBF) Scan() (DBFRecord, error) + type ScannerSHP struct + func NewScannerSHP(reader io.ReadCloser, size int64, options *ReadSHPOptions) (*ScannerSHP, error) + func (s *ScannerSHP) Scan() (*SHPRecord, error) + type ScannerSHX struct + func NewScannerSHX(reader io.ReadCloser, size int64) (*ScannerSHX, error) + func (s *ScannerSHX) Scan() (*SHXRecord, error) + type ShapeType uint + const ShapeTypeMultiPatch + const ShapeTypeMultiPoint + const ShapeTypeMultiPointM + const ShapeTypeMultiPointZ + const ShapeTypeNull + const ShapeTypePoint + const ShapeTypePointM + const ShapeTypePointZ + const ShapeTypePolyLine + const ShapeTypePolyLineM + const ShapeTypePolyLineZ + const ShapeTypePolygon + const ShapeTypePolygonM + const ShapeTypePolygonZ + type Shapefile struct + CPG *CPG + DBF *DBF + PRJ *PRJ + SHP *SHP + SHX *SHX + func Read(basename string, options *ReadShapefileOptions) (*Shapefile, error) + func ReadFS(fsys fs.FS, basename string, options *ReadShapefileOptions) (*Shapefile, error) + func ReadScanner(scanner *Scanner) (*Shapefile, error) + func ReadZipFile(name string, options *ReadShapefileOptions) (*Shapefile, error) + func ReadZipReader(zipReader *zip.Reader, options *ReadShapefileOptions) (*Shapefile, error) + func (s *Shapefile) NumRecords() int + func (s *Shapefile) Record(i int) (map[string]any, geom.T)