Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadCloser ¶
ReadCloser provides a Reader that also has associated resources that must be closed by the caller.
func NewReaderFromZip ¶
func NewReaderFromZip(r *zip.Reader, name string) (*ReadCloser, error)
NewReaderFromZip is a convenience utility for the common task of opening a shapefile and its associated attribute database from within a zip archive. The name provided should not include a file extension. For instance, if you with to open the archived file pts.shp (which also implies opening pts.dbf if it is present), name should be provided as "pts".
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader provides sequential access to the records in the shapefile.
func NewReader ¶
NewReader creates a new Reader that provides sequential access to the records in a shp file structure. Optionally, a dbf io.Reader can be provided that will also provide access to the attributes that correspond to each shp record.
func (*Reader) BBox ¶
BBox returns the bounding box that was declared in the file header of the .shp structure.
func (*Reader) FieldCount ¶
FieldCount returns the number of fields.
func (*Reader) Fields ¶
Fields returns the fields that were declared in the dbf header structure. If no dbf was provided when the Reader was created, this will return nil.
func (*Reader) Next ¶
Next reads the next record from the underlying readers. When the end of the shp reader is reached, this will return io.EOF. If a dbf reader is provided that has fewer records than the given shp reader, io.ErrUnexpectedEOF will be returned after the last record in the db reader.