MCPcopy Create free account
hub / github.com/PDAL/PDAL / toGeoJSON

Function toGeoJSON

pdal/util/Bounds.hpp:275–287  ·  view source on GitHub ↗

Convert this box to a GeoJSON text string. \param precision Precision for output [default: 8] \return String format of this box. */

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

strMethod · 0.80
emptyFunction · 0.70
precisionMethod · 0.45

Tested by

no test coverage detected