12 #ifndef FMM_GEOM_ALGORITHM_HPP
13 #define FMM_GEOM_ALGORITHM_HPP
15 #include "core/geometry.hpp"
100 double *x1,
double *y1,
double *x2,
double *y2);
124 double x2,
double y2,
125 double *dist,
double *offset);
144 double x2,
double y2,
double *dist,
145 double *offset,
double *closest_x,
163 double *result_offset);
181 double *result_dist,
double *result_offset,
182 double *proj_x,
double *proj_y);
196 double offset,
double *x,
double *y);
FMM::CORE::LineString reverse_geometry(const FMM::CORE::LineString &rhs)
Create a new linestring as the reverse of an input linestring.
std::vector< FMM::CORE::LineString > split_line(const FMM::CORE::LineString &line, double delta)
Interpolate a linestring at a fixed distance threshold and return the result in as a vector of linest...
FMM::CORE::LineString interpolate_line_distance(const FMM::CORE::LineString &line, double distance)
Interpolate a linestring according to a distance step value.
FMM::CORE::LineString interpolate_line_kpoints(const FMM::CORE::LineString &line, int k)
Interpolate k points in a linestring with equal distance.
FMM::CORE::LineString interpolate_line_distances(const FMM::CORE::LineString &line, const std::vector< double > &distances)
Interpolate a linestring according to a vector of distances to the start point of a line.
void locate_point_by_offset(const FMM::CORE::LineString &linestring, double offset, double *x, double *y)
Locate the point on a linestring according to the input of offset The two pointer's target value will...
void boundingbox_geometry(const FMM::CORE::LineString &linestring, double *x1, double *y1, double *x2, double *y2)
Compute the boundary of an FMM::CORE::LineString and returns the result in the passed x1,...
Linestring geometry class.
FMM::CORE::LineString cutoffseg_unique(const FMM::CORE::LineString &linestring, double offset1, double offset2)
Cut a linestring at two offset values.
void linear_referencing(double px, double py, const FMM::CORE::LineString &linestring, double *result_dist, double *result_offset)
A linear referencing function.
void closest_point_on_segment(double x, double y, double x1, double y1, double x2, double y2, double *dist, double *offset)
Calculate the closest point p' on a segment p1 (x1,y1) p2 (x2,y2) to a specific point p (x,...
void append_segs_to_line(FMM::CORE::LineString *line, const FMM::CORE::LineString &segs, int offset=0)
Concatenate a linestring segs to a linestring line, used in the function network.complete_path_to_geo...
FMM::CORE::LineString cutoffseg(const FMM::CORE::LineString &linestring, double offset, int mode)
Added by Diao 18.01.17 modified by Can 18.01.19 modified by Can 18.03.14.
std::vector< double > cal_eu_dist(const FMM::CORE::LineString &trajectory)
Calculate segment length of a trajectory.
std::vector< double > calc_length_to_end_vec(const FMM::CORE::LineString &geom)
Calculate the distance from each point in a linestring to the end point of a linestring.