[OSM-talk] how big are ways?

Paul Fox pgf at foxharp.boston.ma.us
Mon Nov 26 16:47:46 GMT 2007


thanks very much for such an excellent reply.  :-)

considering these numbers, and in considering how to use the
results, it occurs to me that i probably asked somewhat the wrong
question.  my thinking has been skewed by my experience with the
internals of RoadMap, where lines (ways) are searchable by their
endpoints only, and by my current use of the OSM Binary Mobile
protocol, which doesn't return nodes that exist solely to help
define a way. 

here's my issue:  if i request a quadtile via the OSM binary
protocol, it will return all ways that touch that quadtile,
unless those ways have already been returned with a previous
request for a neighboring quadtile, in which cases it returns
just the way-id for that omitted way.  due to the approach i'm
currently taking to storing and using the quadtile data, the
omitted way-id that's returned isn't of much use, so i simply
rely on the neighboring tiles to supply the required missing
ways.  however, it seems to me that this will fail for cross-over
ways.  at first i was thinking that i could help reduce scale of
the issue by making my quadtile requests large enough to cover
the length (or, really, half the length) of "most" ways.  but i
now realize that a) that would require quadtiles that are _much_
too big (given the data you provided), and b) what i'm interested
in isn't really the typical end-to-end dimension of a way, but
the typical node-to-node dimension, since that's what will
guarantee that a node is referenced in any given quadtile.  [please
correct me if i've committed some wrong-think here someplace.]

given the numbers below, i suspect that most ways will have a
maximum inter-node distance that's less than 20 or 30km, which is
the quadtile size i've been targeting (since it's a dimension
that leverages RoadMaps internal efficiencies well).  (and if you
have stats at your fingertips either corroborating or refuting
that hypothesis, i'd certainly be interested...  :-)

paul


dave wrote:
 > only about 10 ways are more than 1000km ish (a couple of trunk roads
 > in Russia (M-4, M-5), the Argentine-Chile border, lake Nasser, the
 > Indus river, and a railway)
 > only about 2k ways are more than 100km ish
 > about 120k ways are more than 10km ish
 > about 1.5m ways are more than 1km ish
 > leaving about 6.9m smaller than 1km ish
 > 
 > In terms of number of nodes:
 > - maximum: 6200 nodes (148th Street, Brown Country, South Dakota)
 > - mean: 12 nodes
 > 
 > There are 636 lines which have more than 1000 points, with 68 having
 > more than 2000. These ways should probably be split as they'll
 > probably cause problems if they are not.
 > 
 > I hope that helps.
 > 
 > Dave

=---------------------
 paul fox, pgf at foxharp.boston.ma.us (arlington, ma, where it's 38.8 degrees)




More information about the talk mailing list