This PR adds a new interface SequentialReader that allows serial access to the shapes in a shapefile.
Reader was extended to implement SequentialReader.
A new exported type ZipReader was added that allows reading shapes and attributes
An unexported type seqReader implements SequentialReader based two io.ReadCloser, one for the .shp and one for the .dbf. It is used internally by the ZipReader, but can be instantiated from outside the package by calling SequentialReaderFromExt().
Tests that read shapes from the available test files, but sequentially or zipped prior to reading. To allow for easy reuse of the expected values, the tests have been refactored a bit.
A test that potentially downloads a public domain dataset as a ZIP file via HTTP and compares the shapes and attributes when read in the usual way and directly from the ZIP.
Attempt to fix #4
This PR adds a new interface
SequentialReader
that allows serial access to the shapes in a shapefile.Reader
was extended to implementSequentialReader
.ZipReader
was added that allows reading shapes and attributesseqReader
implements SequentialReader based twoio.ReadCloser
, one for the.shp
and one for the.dbf
. It is used internally by theZipReader
, but can be instantiated from outside the package by callingSequentialReaderFromExt()
.