parsing continued

This commit is contained in:
vcoppe
2026-09-18 09:50:04 +02:00
parent 69049e1345
commit 20222c450d
4 changed files with 175 additions and 57 deletions
+13 -2
View File
@@ -1,7 +1,5 @@
use crate::gpx::{Link, LngLat};
pub type WaypointChunk = Vec<Waypoint>;
#[derive(Debug, Default)]
pub struct Waypoint {
pub coordinates: LngLat,
@@ -14,3 +12,16 @@ pub struct Waypoint {
pub sym: Option<String>,
pub type_: Option<String>,
}
static MAX_CHUNK_SIZE: usize = 128;
#[derive(Debug, Default)]
pub struct WaypointChunk {
pub wpt: Vec<Waypoint>,
}
impl WaypointChunk {
pub fn is_full(&self) -> bool {
self.wpt.len() == MAX_CHUNK_SIZE
}
}