Created
December 16, 2016 09:11
-
-
Save ramiroaznar/a8cfc3fd1a443aaaff1aa061283a14b4 to your computer and use it in GitHub Desktop.
Routing Analysis with CARTO geocoding functions
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
WITH a AS ( | |
SELECT * FROM mad_comm_home_centroids | |
), | |
b AS ( | |
SELECT * FROM mad_comm_work_centroids | |
) | |
SELECT | |
c.duration as seconds, | |
c.duration/60 as minutes, | |
c.length, | |
c.shape as the_geom | |
FROM | |
a, b, cdb_route_point_to_point(a.the_geom, b.the_geom, 'car') c | |
WHERE | |
a.cartodb_id = b.cartodb_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment