The various iter_shapes_asiter_shapes_and_records_as
now take &mut self instead of self to be able
to use dbase::RecordIterator.
Move the purely shapefile related reader in a new
ShapeReader struct and use it in the Reader struct.
ShapeReader may be useful for projects wich don't care about dbf
Same thing for writing
`ShapeWriter is a new struct that handle the writing of the shp and shx.
The Reader has a handle to a ShapeWriter and dbase::TableWriter.
Things to decide:
Should the dbase::Reader of the Reader be mandatory and not an Option anymore ?
Meaning Reader::from_path would error_out if the `.dbf`` is not found.
The dbase::TableWriter is mandaoty to create a new shapefile::Writer because the esri spec
seems to say that .dbf are mandaroty (and should contain at least on field), so by "symmetry" the
shapefile::Reader should also require a dbf file
TODO:
[x] Creating a Writer Using the dbf info from a Reader.
[x] Documentation
[ ] Release new dbase version & update Cargo.toml to use it
Writing shapes / records one by one as oppposed to all at once should be added in another pr
The various
iter_shapes_as
iter_shapes_and_records_as
now take&mut self
instead ofself
to be able to usedbase::RecordIterator
.Move the purely shapefile related reader in a new
ShapeReader
struct and use it in theReader
struct.ShapeReader
may be useful for projects wich don't care about dbfSame thing for writing `ShapeWriter is a new struct that handle the writing of the shp and shx.
The
Reader
has a handle to aShapeWriter
anddbase::TableWriter
.Things to decide:
Should the
dbase::Reader
of theReader
be mandatory and not anOption
anymore ? MeaningReader::from_path
would error_out if the `.dbf`` is not found.The
dbase::TableWriter
is mandaoty to create a newshapefile::Writer
because the esri spec seems to say that.dbf
are mandaroty (and should contain at least on field), so by "symmetry" theshapefile::Reader
should also require adbf
fileTODO:
Writer
Using thedbf
info from aReader
.Writing shapes / records one by one as oppposed to all at once should be added in another pr
Addresses #16