Go library for reading and writing ESRI Shapefiles. Pure Golang implementation based on the ESRI Shapefile technical description.
https://github.com/jonas-p/go-shp
49 forks.
204 stars.
14 open issues.
Recent commits:
- Add missing errReader usage, Fabian Wickborn
- Check for errors while reading header, Fabian Wickborn
- Symptom: the shape last shape was not being readRoot Cause:reader.Next was returning false due to an error being reported in r.shape.read(er) error: r.err = fmt.Errorf("Error while reading next shape: %v", er.e)However the error is wrongly reported by errreader.Go documentation states that an EOF error may be returned even if all therequested data has been read, but go-shp was treating EOF error as an erroreven when all the bytes have been read.Go documentation: https://go.googlesource.com/go/+/master/src/io/io.go#66// Callers should always process the n > 0 bytes returned before// considering the error err. Doing so correctly handles I/O errors// that happen after reading some bytes and also both of the// allowed EOF behaviors.errreader.go was giving priority to the err over the number of bytes being readNote: This behaviour did not manifest itself in every environment.Running locally on Ubuntu, the last shape was being read OKRunning on Google App Engine, the last shape was not being read due to this bug, Fabian Wickborn
- check for .shp extension when opening file, Fabian Wickborn
- generate String method for ShapeType, Fabian Wickborn