pub struct GeometryStats {
pub header_y: f32,
pub doc_footer_y: f32,
pub left_x: f32,
pub right_x: f32,
pub per_page_footer_y: Vec<Option<f32>>,
pub source_pages: u32,
pub page_dimensions: PageDimensions,
pub column_layout: ColumnLayout,
pub heatmap: DensityGrid,
pub diagnostic: GeometryDiagnostic,
}Expand description
Document-level geometry: five lines defining six regions on the page, plus the column layout and a downsampled persistent heatmap.
Coordinate convention: PDF/Tika points, y increasing downward.
header_y < doc_footer_y; left_x < right_x. Body region is
header_y <= y < doc_footer_y ∩ left_x < x < right_x.
Fields§
§header_y: f32Top boundary of body. Body at y > header_y; header zone at y < header_y.
Bottom boundary of body at the document level. Body at y < doc_footer_y;
below is the doc-level footer zone (running footer chrome + bottom margin).
Per-page footers (variable footnotes) are captured separately via
per_page_footer_y and are always at y <= doc_footer_y.
left_x: f32Horizontal body bounds. Body at left_x < x < right_x; outside is margin.
right_x: f32Per-page footer line, indexed by sample-page order (one entry per page
in source_pages). Some(y): per-page body bottom; always
<= doc_footer_y by construction. None: page has no detectable body
in its bottom half (e.g., references-only page, near-empty page, cover
page with no body content). Downstream consumers should fall back to
doc_footer_y for None entries.
source_pages: u32Number of pages stacked into the heatmap and analyzed for per-page footers. Capped at config.page_analysis_count; may be less for short docs.
page_dimensions: PageDimensionsPage dimensions used for the heatmap (max across sampled pages).
column_layout: ColumnLayoutDetected column structure inside the body region.
heatmap: DensityGridDownsampled persistence of the bbox-stacking heatmap. See
DensityGrid doc. Available to downstream pipes (e.g., Page
Outlier Detection) as the document’s spatial signature.
diagnostic: GeometryDiagnosticDiagnostic summary of the walks and per-page analysis.
Trait Implementations§
Source§impl Clone for GeometryStats
impl Clone for GeometryStats
Source§fn clone(&self) -> GeometryStats
fn clone(&self) -> GeometryStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more