Le 03/12/2011 19:54, Jocelyn Jaubert a écrit :
Le 3 décembre 2011, darrepac a écrit :
Salut

Je cherche à connaître certains éléments sur OSM. Par exemple
j'aimerais connaître le nombre de km de highway=path ou track sur la
France entière. Ce sujet a été discuté dans le passé (archive ici par
ex.: http://web.archiveorange.com/archive/v/MHd6xCScRenv1I3PRInT )
mais aucun des liens indiqués alors ne sont encore valides. De plus,
je ne suis pas un expert postgis etc

Si quelqu'un sait où je peux trouver ça ou alors comment
Pascal
J'ai ceci sur une base de donnée France à jour:

  highway   | nombre | kilomètrage
=================================
  motorway  | 11075  | 33423
  primary   | 61954  | 71965
  secondary | 119497 | 166829
  tertiary  | 159299 | 271228
  path      | 72917  | 53742
  track     | 213626 | 193805

(nombre est le nombre de way ayant ce tag là).


Ça peut faire parti des données que je peux générer à chaque mise à
jour de la base de donnée. Est-ce que ça serait utile ?


Merci,
Jocelyn

J'ai des écarts étonnants.
Bon ma base n'est pas à jour, mais elle a moins d'un mois.

motorway      10992     11 391,41*
trunk          9561     12 359,87
primary       61809     49 721,93
secondary    118976    114 041,37
tertiary     158090    183 638,78
unclassified 338434    214 617,02
residential  643626    137 270,08
track        209948    130 940,25
path          71795     36 909,15
footway       87303     13 618,74

* longueur totale divisée par 2

Ma requête :
SELECT
    l.highway AS type,
    count(*) AS number,
    CASE WHEN l.highway = 'motorway' THEN 0.5
        ELSE 1
        END
* ROUND(SUM(ST_Length_Spheroid( way,'SPHEROID["GRS_1980",6378137,298.257222101]' )))/1000 AS length
FROM
    france_line AS l
    JOIN (VALUES
        ('motorway'),
        ('trunk'),
        ('primary'),
        ('secondary'),
        ('tertiary'),
        ('unclassified'),
        ('residential'),
        ('track'),
        ('path'),
        ('footway')
    ) AS k(kw)
    ON l.highway = k.kw
GROUP BY
    l.highway
--
FrViPofm

_______________________________________________
Talk-fr mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/talk-fr

Répondre à