22 May 2005 20:15
who?
SteveC <steve <at> fractalus.com>
2005-05-22 18:15:08 GMT
2005-05-22 18:15:08 GMT
who changed the background colour(s) to white, and why? have fun, SteveC steve <at> fractalus.com http://www.fractalus.com/steve/
who changed the background colour(s) to white, and why? have fun, SteveC steve <at> fractalus.com http://www.fractalus.com/steve/
* <at> 22/05/05 07:15:08 PM steve <at> fractalus.com wrote: > who changed the background colour(s) to white, and why? this sounded pissed off, but I'm not at all. to elaborate - I think I stole, sorry, infringed the copyright of the background colour from google maps or streetmap. or something, simply because it looked nice. Ideas on colours? have fun, SteveC steve <at> fractalus.com http://www.fractalus.com/steve/
you can now view the subversion archives using a whizzy html interface here: http://www.openstreetmap.org/WebSVN/ I've linked to it on the wiki. I've got rid of the old 'getStreets' function and its database table. Been asked a few times so I've started a little page on the concepts behind getting data from the interface here: http://www.openstreetmap.org/newwiki/index.php/GettingData to explain getting nodes, then streets etc. Input welcome, of course. have fun, SteveC steve <at> fractalus.com http://www.fractalus.com/steve/
I've had to look at google maps a bit lately looking closely at http://maps.google.co.uk/maps?q=aberdeen+place+london&spn=0.015167,0.034171&hl=en for example, I think it'd be possible to recreate that by starting with a black background. dra your lines by iterating a pixel at a time down the line drawing a filled white circle at each pixel. hence the rounded edges in goole maps. now you have a load of black islands. fill those with that white brown colour and the black pixels which touch a white pixel the darker brown. i think its approximately that simple, though there are details with the white -> darkbrown -> lightbrown boundaries. the black/white colouring is just to make it a clear description... ideas? have fun, SteveC steve <at> fractalus.com http://www.fractalus.com/steve/
>From an SVG perspective your algorithm is a bit too low-level. SVG has primatives like: line, polyline, circle, path (supports beizer curves). These can be styled using attributes like: stoke-width, stroke-color, stroke-linecap, fill-color, etc. Streets all one color, with no outline color, could be done in SVG as a 'round join, as shown here: http://zvon.org/xxl/svgReference/Output/exd0e19960.html No exit streets can be done as 'round' cap lines: http://zvon.org/xxl/svgReference/Output/exd0e19896.html On Saturday, for outlined streets, Nick and I were looking at an approach line this: 1) set background to that light brown color 2) draw thick white lines along the street vectors 3) draw separate dark brown outlines at the edge of the thick white lines; when lines intersect: a) use the angle of intersection to calculate the appropriate place to stop the dark brown outlines on side where intersection angle is less than 180 degrees. b) if there is an intersection angle greater than 180 degrees then calculate the start and end points of the arc needed to draw the rounded edge outline. I believe Nick has coded the algorithm to do the caculation for step 3(a). Other drawing ideas welcome.(Continue reading)Rob
My bad, but umm -- that puke orange color was awful as the background of my desktop image. For now I hope we'll keep everything as basic shades of black/gray/white, and eventually ask someone with a good eye for this sort of thing to decide on a color scheme. Ben On 22 May 2005, at 19:44, SteveC wrote: > * <at> 22/05/05 07:15:08 PM steve <at> fractalus.com wrote: >> who changed the background colour(s) to white, and why? > > this sounded pissed off, but I'm not at all. > > to elaborate - I think I stole, sorry, infringed the copyright of the > background colour from google maps or streetmap. or something, simply > because it looked nice. > > Ideas on colours? > > have fun,
so something like looking at the attached png: 6 lines represented by letters b and e are street segments connected by the node represented by the circle, of radius r. distance between adjacent lines is r also., hence they are parallel and glance the circle. the b - e intersection Ill call p angle b-p-e is the angle between lines, get that by dot product of p-b and p-e. call that angle t for theta. point g is where b crosses the circle. transform the circle to the origin. make point g the complex coordinate r*exp(i t), where r=radius, t = theta. multiply complex g by exp[i Pi] rotates it 90 degrees left which gets the point where a glances the circle. multiply by exp[i -Pi] to get where c glances. do the same for the other end of the node to get a and c in the first place if you want. do the same for d and f. now you just need where d crosses c which is a line intersection test, so you have your arc and all the points to draw in brown now make it an algorithm where you can add an arbitrary number of lines,(Continue reading)
and this time I'll actually attach the png * <at> 23/05/05 04:38:23 PM steve <at> fractalus.com wrote: > so something like > > looking at the attached png: > > 6 lines represented by letters > > b and e are street segments connected by the node represented by the > circle, of radius r. distance between adjacent lines is r also., hence > they are parallel and glance the circle. > > the b - e intersection Ill call p > > angle b-p-e is the angle between lines, get that by dot product of p-b > and p-e. call that angle t for theta. > > point g is where b crosses the circle. transform the circle to the > origin. make point g the complex coordinate r*exp(i t), where r=radius, > t = theta. > > multiply complex g by exp[i Pi] rotates it 90 degrees left which gets > the point where a glances the circle. multiply by exp[i -Pi] to get > where c glances. do the same for the other end of the node to get a and > c in the first place if you want. > > do the same for d and f. > > now you just need where d crosses c which is a line intersection test,(Continue reading)
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(Continue reading)
(Apologies to Matt who got two copies of this). Here's a demo in Processing which shows how to do it without inventing our own clever line stroking algorithms. http://www.tom-carden.co.uk/p5/osm_lines/applet/ Click to add nodes. Click and drag to join nodes. Space to clear. Apologies for lack of interface feedback, but I'm sure you get the idea. It draws thick black strokes with rounded caps, then thinner white strokes with rounded caps. Viola! Outlined roads, without computing stacks of intersections. Java2d can definitely do this (Processing uses Java2d behind the scenes). Since I emailed Matt, I realised that this would need some tweaking if it was to work for bridges etc. Still, it's a start. Cheers, Tom. Matt Amos wrote: > On Monday 23 May 2005 16:39, SteveC wrote: > >>and this time I'll actually attach the png > > > this is cool.(Continue reading)
RSS Feed36 | |
|---|---|
166 | |
137 | |
118 | |
119 | |
118 | |
122 | |
190 | |
382 | |
143 | |
126 | |
236 | |
126 | |
120 | |
190 | |
259 | |
138 | |
176 | |
274 | |
182 | |
116 | |
89 | |
251 | |
177 | |
270 | |
309 | |
269 | |
161 | |
180 | |
301 | |
300 | |
237 | |
259 | |
252 | |
400 | |
264 | |
189 | |
235 | |
211 | |
475 | |
211 | |
265 | |
303 | |
217 | |
283 | |
553 | |
287 | |
387 | |
336 | |
458 | |
672 | |
398 | |
379 | |
412 | |
485 | |
532 | |
419 | |
360 | |
393 | |
357 | |
246 | |
581 | |
387 | |
409 | |
450 | |
388 | |
194 | |
430 | |
536 | |
619 | |
523 | |
517 | |
398 | |
704 | |
555 | |
510 | |
303 | |
327 | |
136 | |
277 | |
130 | |
260 | |
262 | |
255 | |
119 | |
186 | |
143 | |
106 | |
88 | |
104 | |
95 | |
73 | |
64 | |
109 | |
62 | |
73 | |
21 | |
60 | |
21 |