public function routeBetweenNodes(
        $waysTableName,
        $waysGeomFieldName,
        $startNodeId,
        $endNodeId,
        $srid,
        $directedGraph = false,
        $hasReverseCost = false)
    {
        /** @var Connection $db */
        $db = $this->getConnection();
        $waysTableName = $db->quoteIdentifier($waysTableName);
        $geomFieldName = $db->quoteIdentifier($waysGeomFieldName);
        $directedGraph = $directedGraph ? 'TRUE' : 'FALSE'; // directed graph [true|false]
        $hasReverseCost = $hasReverseCost && $directedGraph ? 'TRUE' : 'FALSE'; // directed graph [true|false]
        $results = $db->query("SELECT
                route.seq as orderId,
                route.id1 as startNodeId,
                route.id2 as endNodeId,
                route.cost as distance,
                ST_AsEWKT ($waysTableName.$geomFieldName) AS geom
            FROM
                pgr_dijkstra (
                    'SELECT gid AS id, source, target, length AS cost FROM $waysTableName',
                    $startNodeId,
                    $endNodeId,
                    $directedGraph,
                    $hasReverseCost
                ) AS route
            LEFT JOIN $waysTableName ON route.id2 = $waysTableName.gid")->fetchAll();
        return $this->prepareResults($results, $srid);
    }
public function routeBetweenNodes(
        $waysTableName,
        $waysGeomFieldName,
        $startNodeId,
        $endNodeId,
        $srid,
        $directedGraph = false,
        $hasReverseCost = false)
    {
        /** @var Connection $db */
        $db = $this->getConnection();
        $waysTableName = $db->quoteIdentifier($waysTableName);
        $geomFieldName = $db->quoteIdentifier($waysGeomFieldName);
        $directedGraph = $directedGraph ? 'TRUE' : 'FALSE'; // directed graph [true|false]
        $hasReverseCost = $hasReverseCost && $directedGraph ? 'TRUE' : 'FALSE'; // directed graph [true|false]
        $results = $db->query("SELECT
                route.seq as orderId,
                route.id1 as startNodeId,
                route.id2 as endNodeId,
                route.cost as distance,
                ST_AsEWKT ($waysTableName.$geomFieldName) AS geom
            FROM
                pgr_dijkstra (
                    'SELECT gid AS id, source, target, length AS cost FROM $waysTableName',
                    $startNodeId,
                    $endNodeId,
                    $directedGraph,
                    $hasReverseCost
                ) AS route
            LEFT JOIN $waysTableName ON route.id2 = $waysTableName.gid")->fetchAll();
        return $this->prepareResults($results, $srid);
    }
public function routeBetweenNodes ( $ waysTableName , $ waysGeomFieldName , $ startNodeId , $ endNodeId , $ srid , $ directedGraph = false , $ hasReverseCost = false ) { /** @var Connection $db */ $ db = $ this -> getConnection ( ) ; $ waysTableName = $ db -> quoteIdentifier ( $ waysTableName ) ; $ geomFieldName = $ db -> quoteIdentifier ( $ waysGeomFieldName ) ; $ directedGraph = $ directedGraph ? 'TRUE' : 'FALSE' ; // directed graph [true|false] $ hasReverseCost = $ hasReverseCost && $ directedGraph ? 'TRUE' : 'FALSE' ; // directed graph [true|false] $ results = $ db -> query ( "SELECT
                route.seq as orderId,
                route.id1 as startNodeId,
                route.id2 as endNodeId,
                route.cost as distance,
                ST_AsEWKT ($waysTableName.$geomFieldName) AS geom
            FROM
                pgr_dijkstra (
                    'SELECT gid AS id, source, target, length AS cost FROM $waysTableName',
                    $startNodeId,
                    $endNodeId,
                    $directedGraph,
                    $hasReverseCost
                ) AS route
            LEFT JOIN $waysTableName ON route.id2 = $waysTableName.gid" ) -> fetchAll ( ) ; return $ this -> prepareResults ( $ results , $ srid ) ; }
Route between nodes

@param      $waysTableName
@param      $waysGeomFieldName
@param int $startNodeId
@param int $endNodeId
@param      $srid
@param bool $directedGraph directed graph
@param bool $hasReverseCost Has reverse cost, only can be true, if  directed graph=true
@return \Mapbender\DataSourceBundle\Entity\Feature[]
Route between nodes