[OSM-talk] colour fills in osmarender

Etienne 80n80n at gmail.com
Thu Jun 8 09:11:42 BST 2006


On 6/8/06, Dan Karran <dan at karran.net> wrote:
> On 6/8/06, Etienne <80n80n at gmail.com> wrote:
>
> > The fills in the Chertsey map were done using a newer, currently
> > experimental, version of Osmarender.  The intention is to process
> > areas as polygons, but currently there is no editor support for areas.
> >  For experimental puposes I have been using ways tagged as though they
> > were areas (eg k=leisure v=park).  Since the data schema for areas is
> > identical to ways this actually works quite well.
>
> To render an area, would the segments in the way all have to be in
> order and all going in the same direction? If so, what would be really
> useful, in JOSM say, would be a tool that ordered and aligned all the
> segments in a common direction.

Yes, the path that defines the boundary of the area should be
contiguous - this means that the to node of each segment should also
be from node of the next segment.  SVG will try to draw something even
if this condition is not satisfied, but the results are not pretty.

It would be useful if JOSM could change the direction of segments.  It
would also be useful if the order of segments in a way could be seen
and adjusted (as in the applet).

However, the direction of the segment is often not sufficient to
describe things.  If you have two ways (or areas) that share the same
segment then there can be problems.  For ways, if two routes share the
same segment, but are in different directions, or if two areas share a
common boundary, but one is drawn clockwise and the other
anti-clockwise, then the segment is going to be in the wrong direction
for one of these cases.

The only solution I can see that would work for these situations would
be to have a direction property on the segment within the context of
the way or area that would override/reverse the direction implied by
the segment.  Like this:
  <way id='1234'>
    <seg id='54112' />
    <seg id='54113' direction='-1' />
  </way>

Etienne





>
>
> Cheers,
> Dan
>
> --
> Dan Karran
> dan at karran.net
> www.dankarran.com
>




More information about the talk mailing list