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
/* | |
pgrw_xyroute is an example of a wrapper around the pgr_trsp function to require only x/y inputs | |
for source and target points. Routing is then done by pgr_trsp using the nearest location on | |
the closest edges to the source and target points. To achieve this result, the details of the | |
specific routing network are hard-coded as constants in the wrapper. Modification to your | |
specific situation should be simple. | |
*/ | |
CREATE OR REPLACE FUNCTION pgrw_xyroute(source_x double precision, source_y double precision, | |
target_x double precision, target_y double precision) |
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
<?php | |
/** | |
* Convert a comma separated file into an associated array. | |
* The first row should contain the array keys. | |
* | |
* Example: | |
* | |
* @param string $filename Path to the CSV file | |
* @param string $delimiter The separator used in the file | |
* @return array |