Fast map matching  0.1.0
Classes | Typedefs | Functions
FMM::CORE Namespace Reference

Core data types. More...

Classes

class  LineString
 Linestring geometry class. More...
 
struct  Trajectory
 Trajectory class More...
 

Typedefs

typedef boost::geometry::model::point< double, 2, boost::geometry::cs::cartesian > Point
 Point class.
 

Functions

std::ostream & operator<< (std::ostream &os, const FMM::CORE::LineString &rhs)
 
LineString ogr2linestring (const OGRLineString *line)
 Convert a OGRLineString to a linestring. More...
 
LineString ogr2linestring (const OGRMultiLineString *mline)
 Convert a OGRMultiLineString to a linestring. More...
 
LineString wkt2linestring (const std::string &wkt)
 Convert a wkt into a linestring. More...
 
OGRLineString * linestring2ogr (const LineString &line)
 Convert a linestring into a OGRLineString. More...
 
OGRPoint * point2ogr (const Point &p)
 Convert a point into a OGRPoint. More...
 

Detailed Description

Core data types.

Function Documentation

◆ linestring2ogr()

OGRLineString * FMM::CORE::linestring2ogr ( const LineString line)

Convert a linestring into a OGRLineString.

Parameters
lineinput line
Returns
A OGRLineString, the caller is responsible for freeing the memory.

Definition at line 48 of file geometry.cpp.

◆ ogr2linestring() [1/2]

FMM::CORE::LineString FMM::CORE::ogr2linestring ( const OGRLineString *  line)

Convert a OGRLineString to a linestring.

Parameters
linea pointer to OGRLineString
Returns
a linestring

Definition at line 19 of file geometry.cpp.

◆ ogr2linestring() [2/2]

FMM::CORE::LineString FMM::CORE::ogr2linestring ( const OGRMultiLineString *  mline)

Convert a OGRMultiLineString to a linestring.

If the multilinestring contains multiple lines, only the first linestring will be converted and returned as a result.

This function is used in reading data from shapefile.

Parameters
mlinea pointer to the OGRMultiLineString
Returns
a linestring.

Definition at line 29 of file geometry.cpp.

◆ operator<<()

std::ostream & FMM::CORE::operator<< ( std::ostream &  os,
const FMM::CORE::LineString rhs 
)
Parameters
osan input stream
rhsa linestring object
Returns
the wkt representation of the line will be written to the stream.

Definition at line 13 of file geometry.cpp.

◆ point2ogr()

OGRPoint * FMM::CORE::point2ogr ( const Point p)

Convert a point into a OGRPoint.

Parameters
pinput point
Returns
A OGRPoint, the caller is responsible for freeing the memory.

Definition at line 56 of file geometry.cpp.

◆ wkt2linestring()

FMM::CORE::LineString FMM::CORE::wkt2linestring ( const std::string &  wkt)

Convert a wkt into a linestring.

Parameters
wktA wkt representation of a line
Returns
a linestring

Definition at line 42 of file geometry.cpp.