Skip to content

Commit

Permalink
Introduce GeoLineStrings archetype and support it in the map view
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed Nov 1, 2024
1 parent 630eb52 commit 768a3f6
Show file tree
Hide file tree
Showing 46 changed files with 1,423 additions and 12 deletions.
1 change: 1 addition & 0 deletions crates/store/re_types/definitions/rerun/archetypes.fbs

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
namespace rerun.archetypes;

// ---

/// Geospatial line strings 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
table GeoLineStrings (
"attr.rust.derive": "PartialEq",
"attr.docs.category": "Geospatial",
"attr.docs.view_types": "MapView",
"attr.docs.unreleased"
) {
// --- Required ---

/// The lines strings, expressed in EPSG:4326 coordinates.
line_strings: [rerun.components.GeoLineString] ("attr.rerun.component_required", order: 1000);

// --- Recommended ---

/// Optional radii for the line strings.
radii: [rerun.components.Radius] ("attr.rerun.component_recommended", nullable, order: 2000);

/// Optional colors for the linestrings.
///
/// \py The colors are interpreted as RGB or RGBA in sRGB gamma-space,
/// \py As either 0-1 floats or 0-255 integers, with separate alpha.
colors: [rerun.components.Color] ("attr.rerun.component_recommended", nullable, order: 2100);

//TODO(ab): add `Label` and `ShowLabels` components
//TODO(ab): add `Altitude` component
}
1 change: 1 addition & 0 deletions crates/store/re_types/definitions/rerun/components.fbs

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

namespace rerun.components;

// ---

/// A geospatial line string expressed in EPSG:4326 latitude and longitude.
table GeoLineString (
"attr.python.aliases": "datatypes.DVec2DArrayLike, npt.NDArray[np.float64]",
"attr.python.array_aliases": "npt.NDArray[np.float64]",
"attr.rust.derive": "Default, PartialEq",
"attr.rust.repr": "transparent",
"attr.docs.unreleased"
) {
lat_lon: [rerun.datatypes.DVec2D] (order: 100);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace rerun.components;

// ---

/// A geographical position expressed in EPSG:4326 latitude and longitude.
/// A geospatial position expressed in EPSG:4326 latitude and longitude.
struct LatLon (
"attr.python.aliases": "npt.NDArray[np.float32], Sequence[float], Tuple[float, float]",
"attr.python.array_aliases": "npt.NDArray[np.float32], Sequence[float]",
Expand Down
1 change: 1 addition & 0 deletions crates/store/re_types/src/archetypes/.gitattributes

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

232 changes: 232 additions & 0 deletions crates/store/re_types/src/archetypes/geo_line_strings.rs

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

2 changes: 2 additions & 0 deletions crates/store/re_types/src/archetypes/mod.rs

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

1 change: 1 addition & 0 deletions crates/store/re_types/src/components/.gitattributes

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

Loading

0 comments on commit 768a3f6

Please sign in to comment.