[OSM-dev] Map rendering code... API or database direct?
sxpert at esitcom.org
Thu Mar 30 11:04:12 BST 2006
[gah, stupid reply-to headers]
immanuel.scholz at gmx.de wrote:
> There are two solutions to this: Either search through ALL line segments in
> the data base and look whether they cross any of your 4 borders of the tile
> to be rendered. This is slow but works everytime.
> The other is to restrict the maximum length one line segment can have (or just
> assume and hope they are restricted) and grab all data from your tile plus
> the line segment offset widened. Then draw just all line segments and clip
> your tile accordingly out of the bigger picture.
> Of course, you can combine both methods ;-)
there is another better way yet, available at the sql level...
select all line segments that have a "foot" in the tile you're
if (node_a in [tile]) or (node_b in [tile]) then
More information about the dev