tmontaigu / shapefile-rs

Rust library to read & write shapefiles
MIT License
59 stars 19 forks source link

Each Shape that has multiple points has a BBox #13

Closed tmontaigu closed 4 years ago

tmontaigu commented 4 years ago

Introduce a GenericBoundingBox similar to other *Generic struct we already have.

So now, Polyline, PolylineM, PolylineZ, Polygon, PolygonM, PolygonZ, Multipoint have a bbox() method to get that bbox

Also this makes all the struct members of the shapes private with the exception of Point, PointM, PointZ because it will allow us to change how we implement things & and we don't want the user to mutate the points because the bbox may become 'out of sync'