[Openstreetmap-dev] drawing algorihtms

Matt Amos matt at matt-amos.uklinux.net
Mon May 23 21:54:29 BST 2005


On Monday 23 May 2005 16:39, SteveC wrote:
> and this time I'll actually attach the png

this is cool.

i've been looking at the problem in a different way... (without loss 
of generality etc...) considering regions as closed polygons:

initial.png: shows the "initial" state - just lines downloaded from 
OSM.

step1.png: inset the lines by x+y pixels where x is the road width, y 
is the "outer" line width.

step2.png: start with a black background and fill the inset polygons, 
make the road lines have round joins and caps (stroked in white), as 
Rob was saying.

step 3.png: add text on the road lines.

now, the maximum complexity is the same as steve was saying, but in 
general, with closed non-overlapping polygons, you only have to 
consider the left and right lines of the polygon at each vertex...

cya,

matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: initial.png
Type: image/png
Size: 3222 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20050523/9e560113/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: step1.png
Type: image/png
Size: 5428 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20050523/9e560113/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: step3.png
Type: image/png
Size: 11520 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20050523/9e560113/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: step2.png
Type: image/png
Size: 7383 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20050523/9e560113/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20050523/9e560113/attachment.pgp>


More information about the dev mailing list