[OSM-talk] Norton, the village in the sea?

SteveC steve at asklater.com
Wed May 10 09:32:43 BST 2006


* @ 10/05/06 09:21:42 AM openstreetmap-L at gj0.net wrote:
> On 5/10/06, SteveC <steve at asklater.com> wrote:
> >* @ 09/05/06 11:30:36 PM openstreetmap-L at gj0.net wrote:
> >> Nick
> >> See
> >> 
> >http://wiki.openstreetmap.org/index.php?title=Image:Yarmouth.png&rcid=6220
> >>
> >> The label was placed deliberately, for rendering purposes,  so that it
> >> didn't obscure the streets.  It would make sense for the node to
> >> actually be in the place it is supposed to label.  Any ideas about a
> >> better way of doing this?
> >
> >In a past life I did label placement and electrostatic-spring network
> >layout algorithms.
> >
> >Put a spring with some spring constant between the labels and their
> >actual unmoving nodes. Then make all the labels repulsive with some
> >constant so that they move away from each other but cant stray from
> >their nodes because of the spring. Iterate the simulation with friction
> >and it tends to end up with nice label placement, after you play with
> >the two constants.
> 
> Do you have an actual algorithm?

I got bored writing them

http://www.fractalus.com/steve/stuff/ipmap/

http://en.wikipedia.org/wiki/Spring_layout

> 
> There is a way in the current Osmarender to specify an x and y offset
> so that a caption is offset from the node it is on, but this applies
> to all tags of a specific kind.  Maybe the x-offset and y-offset
> should be specifiable as tags on each node - but this would be very
> tedious....
> 
> >XSLT is turing complete right?
> Yes, but doable is not the same as easily doable...
> 
> 
> >
> >have fun,
> >
> >SteveC steve at asklater.com http://www.asklater.com/steve/
> >
> 
> 
> --
> Etienne

have fun,

SteveC steve at asklater.com http://www.asklater.com/steve/




More information about the talk mailing list