jonas-p / go-shp

Go library for reading and writing ESRI Shapefiles. Pure Golang implementation based on the ESRI Shapefile technical description.
MIT License
255 stars 68 forks source link

Add API for reading from arbitrary ReadSeekCloser #43

Open PapaCharlie opened 4 years ago

PapaCharlie commented 4 years ago

This will allow for different sources (e.g. network) to be used when reading ShapeFiles

PapaCharlie commented 4 years ago

Incidentally, this change preserves the old behavior of errors from reading the dbf being completely ignored. I don't think this is a good idea. Is the DBF file necessary? Should it be possible to opt-out entirely, or have a better failure mode if it cannot be read?

codecov-commenter commented 4 years ago

Codecov Report

Merging #43 into master will decrease coverage by 0.29%. The diff coverage is 40.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #43      +/-   ##
==========================================
- Coverage   60.09%   59.80%   -0.30%     
==========================================
  Files           7        7              
  Lines         802      821      +19     
==========================================
+ Hits          482      491       +9     
- Misses        264      272       +8     
- Partials       56       58       +2     
Impacted Files Coverage Δ
reader.go 59.60% <40.74%> (-1.77%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9fd306a...0c70531. Read the comment docs.