This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Function: routing.pgr_trsp_rcost(character varying, integer, integer) | |
-- DROP FUNCTION routing.pgr_trsp_rcost(character varying, integer, integer); | |
CREATE OR REPLACE FUNCTION routing.pgr_trsp_rcost(IN tbl character varying, IN source integer, IN target integer, OUT seq integer, OUT gid integer, OUT geom geometry) | |
RETURNS SETOF record AS | |
$BODY$ | |
DECLARE | |
sql text; | |
rec record; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Function: routing.pgr_fromatob_trsp(character varying, double precision, double precision, double precision, double precision) | |
-- DROP FUNCTION routing.pgr_fromatob_trsp(character varying, double precision, double precision, double precision, double precision); | |
CREATE OR REPLACE FUNCTION routing.pgr_fromatob_trsp(IN tbl character varying, IN x1 double precision, IN y1 double precision, IN x2 double precision, IN y2 double precision, OUT seq integer, OUT gid integer, OUT name text, OUT heading double precision, OUT cost double precision, OUT geom geometry) | |
RETURNS SETOF record AS | |
$BODY$ | |
DECLARE | |
sql text; | |
rec record; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Adapted from pgRouting tutorial to include TRSP with time costs | |
-- Could probably do with some work on quoting variables | |
-- A BBOX would improve performance by all accounts | |
-- Function: routing.pgr_fromatob_trsp_time(character varying, double precision, double precision, double precision, double precision) | |
-- DROP FUNCTION routing.pgr_fromatob_trsp_time(character varying, double precision, double precision, double precision, double precision); | |
CREATE OR REPLACE FUNCTION routing.pgr_fromatob_trsp_time(IN tbl character varying, IN x1 double precision, IN y1 double precision, IN x2 double precision, IN y2 double precision, OUT seq integer, OUT gid integer, OUT name text, OUT heading double precision, OUT cost double precision, OUT geom geometry) | |
RETURNS SETOF record AS | |
$BODY$ | |
DECLARE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- TRSP wrapper with distance costs and turn restrictions | |
-- Function: routing.pgr_fromatob_trsp_length(character varying, double precision, double precision, double precision, double precision) | |
-- DROP FUNCTION routing.pgr_fromatob_trsp_length(character varying, double precision, double precision, double precision, double precision); | |
CREATE OR REPLACE FUNCTION routing.pgr_fromatob_trsp_length(IN tbl character varying, IN x1 double precision, IN y1 double precision, IN x2 double precision, IN y2 double precision, OUT seq integer, OUT gid integer, OUT name text, OUT heading double precision, OUT cost double precision, OUT geom geometry) | |
RETURNS SETOF record AS | |
$BODY$ | |
DECLARE | |
sql text; | |
rec record; |