Skip to content

Commit

Permalink
Add snippet and screenshot for the GeoPoints archetype
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed Nov 1, 2024
1 parent 768a3f6 commit 439a8f7
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace rerun.archetypes;

// ---

/// Geospatial points with positions expressed in EPSG:4326 altitude and longitude, and optional colors and radii.
///
/// **Note**: Geospatial entities are experimental.
// TODO(ab): add snippet and screenshot
///
/// \example archetypes/geo_point_simple title="Log a geospatial point" image="https://static.rerun.io/geopoint_simple/146b0783c5aea1c1b6a9aab938879942b7c820e2/1200w.png"
// TODO(ab): screenshot
table GeoPoints (
"attr.rust.derive": "PartialEq",
"attr.docs.category": "Geospatial",
Expand Down
27 changes: 27 additions & 0 deletions crates/store/re_types/src/archetypes/geo_points.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions docs/content/reference/types/archetypes/geo_points.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions docs/snippets/all/archetypes/geo_point_simple.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Log some very simple geospatial point.

#include <rerun.hpp>

int main() {
const auto rec = rerun::RecordingStream("rerun_example_geopoints");
rec.spawn().exit_on_failure();

rec.log(
"rerun_hq",
rerun::GeoPoints({{59.319221, 18.075631}})
.with_radii(rerun::Radius::ui_points(10.0f))
.with_colors(rerun::Color(255, 0, 0))
);
}
14 changes: 14 additions & 0 deletions docs/snippets/all/archetypes/geo_point_simple.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""Log some very simple geospatial point."""

import rerun as rr

rr.init("rerun_example_geopoints", spawn=True)

rr.log(
"rerun_hq",
rr.GeoPoints(
[59.319221, 18.075631],
radii=rr.Radius.ui_points(10.0),
colors=[255, 0, 0],
),
)
14 changes: 14 additions & 0 deletions docs/snippets/all/archetypes/geo_point_simple.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//! Log some very simple geospatial point.
fn main() -> Result<(), Box<dyn std::error::Error>> {
let rec = rerun::RecordingStreamBuilder::new("rerun_example_geopoints").spawn()?;

rec.log(
"rerun_hq",
&rerun::GeoPoints::new([(59.319221, 18.075631)])
.with_radii([rerun::Radius::new_ui_points(10.0)])
.with_colors([rerun::Color::from_rgb(255, 0, 0)]),
)?;

Ok(())
}
21 changes: 21 additions & 0 deletions rerun_cpp/src/rerun/archetypes/geo_points.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions rerun_py/rerun_sdk/rerun/archetypes/geo_points.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 439a8f7

Please sign in to comment.