Skip to content

Add Coordinate (geo) #39

@vhrcgcom

Description

@vhrcgcom

Description

Implement Coordinate as a ValueObject in the geo module.

Spec: composite: Latitude + Longitude

Implementation checklist

  • Create src/geo/coordinate.rs
  • Implement ValueObject trait
  • Add #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
  • Export from src/geo/mod.rs and prelude
  • Unit tests: valid input · empty input · invalid format · normalisation
  • Doc comment with # Example block
  • Update status in ROADMAP.md from ⬜ to ✅

Implementation detail

Input / Output

Coordinate is a composite value object. Depends on Latitude and Longitude.

Type
Input CoordinateInput { latitude: Latitude, longitude: Longitude }
Output String — e.g. "50.0755, 14.4378"

Validation

Both fields are already validated Latitude and Longitude instances — no additional validation required.

Extra methods

  • latitude() -> &Latitude
  • longitude() -> &Longitude

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions