[OSM-dev] [OSM-talk] FW: OSM stats quote for a paper

Dave Stubbs osm.list at randomjunk.co.uk
Fri Sep 21 15:32:49 BST 2007


On 21/09/2007, Frederik Ramm <frederik at remote.org> wrote:
> Hi,
>
> > I'm keen to know how to do the same thing - I'd love to write that
> > there are currently "XX km of National Cycle Network routes" but I've
> > no idea how to try generating the stats.
>
> First excerpt the area you are interested in using the polygon
> excerpt script or something (the road length counting script won't
> work on the full planet due to memory issues). Then use the script in
> applications/utils/filter/osm-length.
>
> If you have the data in a PostGIS database (as created by osm2pgsql)
> then there's some easy way of letting PostGIS do it all for you but I
> forgot.

There's a length() function. I'm not sure I'm using it right though...

select sum(length(way)) from planet_osm_line where ncn_ref is not null
or ncn is not null;

NCN: 5196633m = 5197km = 3229 miles
RCN: 814583m = 814km = 505 miles
LCN: 323000m = 313km = 194 miles

the values seem on the high side, so I'm not convinced.




More information about the dev mailing list