6#include "../datatypes/dvec2d.hpp"
7#include "../result.hpp"
20 LatLon(
double lat,
double lon) : lat_lon{lat, lon} {}
22 double latitude()
const {
26 double longitude()
const {
42 LatLon(std::array<double, 2> xy_) : lat_lon(xy_) {}
44 LatLon& operator=(std::array<double, 2> xy_) {
61 struct Loggable<components::LatLon> {
62 static constexpr const char Name[] =
"rerun.components.LatLon";
65 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
66 return Loggable<rerun::datatypes::DVec2D>::arrow_datatype();
70 static Result<std::shared_ptr<arrow::Array>> to_arrow(
71 const components::LatLon* instances,
size_t num_instances
73 if (num_instances == 0) {
74 return Loggable<rerun::datatypes::DVec2D>::to_arrow(
nullptr, 0);
75 }
else if (instances ==
nullptr) {
77 ErrorCode::UnexpectedNullArgument,
78 "Passed array instances is null when num_elements> 0."
81 return Loggable<rerun::datatypes::DVec2D>::to_arrow(
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:79
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Component: A geospatial position expressed in EPSG:4326 latitude and longitude (North/East-positive d...
Definition lat_lon.hpp:15
LatLon(double lat, double lon)
Construct LatLon from x/y values.
Definition lat_lon.hpp:20
Datatype: A double-precision vector in 2D space.
Definition dvec2d.hpp:20