Skip to content

Commit

Permalink
Start to organize rendering code into a submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Mar 22, 2024
1 parent bffe369 commit c33e3e2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
3 changes: 0 additions & 3 deletions osm2streets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ pub use osm2lanes::{
mod geometry;
mod ids;
mod intersection;
mod marking;
mod operations;
mod output;
mod paint;
mod pathfinding;
mod render;
mod road;
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions osm2streets/src/render.rs → osm2streets/src/render/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
mod marking;
mod output;
mod paint;

use std::collections::{BTreeMap, BTreeSet};
use std::fs::File;
use std::io::Write;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use itertools::Itertools;

use crate::{BufferType, Direction, LaneType, Placement, StreetNetwork, TrafficInterruption};
use geo::MapCoordsInPlace;
use geom::{Distance, Line, Pt2D};

use osm2lanes::{RoadPosition, TrafficClass};

use crate::marking::{LongitudinalLine, RoadMarking, Transverse};
use crate::paint::PaintArea;
use crate::render::marking::{LongitudinalLine, RoadMarking, Transverse};
use crate::render::paint::PaintArea;
use crate::{BufferType, Direction, LaneType, Placement, StreetNetwork, TrafficInterruption};

#[derive(Clone, Debug, PartialEq)]
pub struct Surface {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{marking, marking::RoadMarking};
use crate::render::{marking, marking::RoadMarking};

// We use geom and stay in map space. Output is done in latlon.
use geom::{Angle, Distance, Line, PolyLine, Polygon, Pt2D, Ring};
Expand Down

0 comments on commit c33e3e2

Please sign in to comment.