Skip to content

Instantly share code, notes, and snippets.

@cquest
Last active July 13, 2016 15:10
Show Gist options
  • Save cquest/bf91a9027ca8d8c48ed7f0927cec55e1 to your computer and use it in GitHub Desktop.
Save cquest/bf91a9027ca8d8c48ed7f0927cec55e1 to your computer and use it in GitHub Desktop.
kilométrage de voies ferrées dena les données OpenStreetMap en France (au 13-07-2016)
select count(*), sum(st_length(st_transform(r.way,4326)::geography)), r.service from planet_osm_line r join planet_osm_polygon p on (st_intersects(r.way,p.way)) where r.railway='rail' and p.osm_id=-2202162 group by 3;
count | sum | service
-------+------------------+--------------
54495 | 52672699.848765 |
6 | 863.600613716276 | industrial
18 | 31704.5442901028 | main
657 | 63642.8733992808 | crossover
14463 | 5710487.2771534 | yard
10976 | 4281735.35639498 | spur
3 | 721.627155530922 | spur; siding
12202 | 4199739.68653881 | siding
(8 lignes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment