Convert this box to a GeoJSON text string. \param precision Precision for output [default: 8] \return String format of this box. */
| 273 | \return String format of this box. |
| 274 | */ |
| 275 | std::string toGeoJSON(uint32_t precision = 8) const |
| 276 | { |
| 277 | if (empty()) |
| 278 | return std::string(); |
| 279 | |
| 280 | Utils::StringStreamClassicLocale oss; |
| 281 | |
| 282 | oss.precision(precision); |
| 283 | oss.setf(std::ios_base::fixed, std::ios_base::floatfield); |
| 284 | oss << "{\"bbox\":[" << minx << ", " << miny << ", " << |
| 285 | maxx << "," << maxy << "]}"; |
| 286 | return oss.str(); |
| 287 | } |
| 288 | |
| 289 | /** |
| 290 | Return a statically-allocated Bounds extent that represents infinity |