CollisionAvoidanceSystem/src/main/java/com/dongni/collisionavoidance/roads/model/RoadInfo.java

67 lines
1.4 KiB
Java

package com.dongni.collisionavoidance.roads.model;
import lombok.Builder;
import lombok.Value;
import org.locationtech.jts.geom.LineString;
import org.locationtech.jts.geom.Polygon;
/**
* Represents the runtime information for a single road, including processed attributes
* and JTS geometry objects. This is typically an immutable object.
*/
@Value
@Builder
public class RoadInfo {
/**
* Unique identifier for the road.
*/
String id;
/**
* Human-readable name of the road.
*/
String name;
/**
* Width of the road in meters.
*/
Double width;
/**
* Speed limit in kilometers per hour.
* Null if not specified or invalid.
*/
Double speedLimitKilometersPerHour;
/**
* Directionality of the road.
*/
RoadDirectionality directionality;
/**
* Height restriction in meters.
* NaN or null if not applicable.
*/
Double heightLimitMeters;
/**
* Width restriction in meters.
* NaN or null if not applicable.
*/
Double widthLimitMeters;
/**
* Indicates if the road is prohibited for passage.
*/
boolean prohibited;
/**
* The JTS LineString representing the road's centerline.
*/
LineString centerline;
/**
* The JTS Polygon representing the road's boundary (calculated via buffering).
*/
Polygon boundary;
}