6#include "../component_descriptor.hpp"
7#include "../datatypes/dvec2d.hpp"
8#include "../result.hpp"
21 LatLon(
double lat,
double lon) : lat_lon{lat, lon} {}
23 double latitude()
const {
27 double longitude()
const {
43 LatLon(std::array<double, 2> xy_) : lat_lon(xy_) {}
45 LatLon& operator=(std::array<double, 2> xy_) {
62 struct Loggable<components::LatLon> {
63 static constexpr ComponentDescriptor Descriptor =
"rerun.components.LatLon";
66 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
67 return Loggable<rerun::datatypes::DVec2D>::arrow_datatype();
71 static Result<std::shared_ptr<arrow::Array>> to_arrow(
72 const components::LatLon* instances,
size_t num_instances
74 if (num_instances == 0) {
75 return Loggable<rerun::datatypes::DVec2D>::to_arrow(
nullptr, 0);
76 }
else if (instances ==
nullptr) {
78 ErrorCode::UnexpectedNullArgument,
79 "Passed array instances is null when num_elements> 0."
82 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:80
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Component: A geospatial position expressed in EPSG:4326 latitude and longitude (North/East-positive d...
Definition lat_lon.hpp:16
LatLon(double lat, double lon)
Construct LatLon from x/y values.
Definition lat_lon.hpp:21
Datatype: A double-precision vector in 2D space.
Definition dvec2d.hpp:21