| 1759 | } |
| 1760 | |
| 1761 | std::string toString() const override { |
| 1762 | if (!bounder_.isValid()) { |
| 1763 | return "<GeoStatistics> invalid"; |
| 1764 | } |
| 1765 | |
| 1766 | std::stringstream ss; |
| 1767 | ss << "<GeoStatistics>"; |
| 1768 | |
| 1769 | std::string dim_label("xyzm"); |
| 1770 | const auto& bbox = bounder_.bounds(); |
| 1771 | auto dim_valid = bbox.dimensionValid(); |
| 1772 | auto dim_empty = bbox.dimensionEmpty(); |
| 1773 | auto lower = bbox.lowerBound(); |
| 1774 | auto upper = bbox.upperBound(); |
| 1775 | |
| 1776 | for (int i = 0; i < 4; i++) { |
| 1777 | ss << " " << dim_label[i] << ": "; |
| 1778 | if (!dim_valid[i]) { |
| 1779 | ss << "invalid"; |
| 1780 | } else if (dim_empty[i]) { |
| 1781 | ss << "empty"; |
| 1782 | } else { |
| 1783 | ss << "[" << lower[i] << ", " << upper[i] << "]"; |
| 1784 | } |
| 1785 | } |
| 1786 | |
| 1787 | std::vector<int32_t> maybe_geometry_types = bounder_.geometryTypes(); |
| 1788 | ss << " geometry_types: ["; |
| 1789 | std::string sep(""); |
| 1790 | for (int32_t geometry_type : maybe_geometry_types) { |
| 1791 | ss << sep << geometry_type; |
| 1792 | sep = ", "; |
| 1793 | } |
| 1794 | ss << "]"; |
| 1795 | |
| 1796 | return ss.str(); |
| 1797 | } |
| 1798 | |
| 1799 | const geospatial::BoundingBox& getBoundingBox() const override { |
| 1800 | return bounder_.bounds(); |
nothing calls this directly
no test coverage detected