[Mapcss] [Proposal] Use "area" pseudo-object rather than way:closed construct; generally, be less OSM-centric
Chris Browet
cbro at semperpax.com
Tue Jul 20 12:20:55 BST 2010
On Tue, Jul 20, 2010 at 12:39, Komяpa <me at komzpa.net> wrote:
> > I tend to think that the MapCSS syntax is too much OSM oriented in the
> > current state.
> > For future version of the specs, I would propose to use more "standard"
> > object selectors rather than the OSM ones, i.e.:
> >
> > node -> point
> > way -> linestring
> > (area -> polygon)
> > (relation[type=multipolygon] -> multipolygon)
> > relation -> (no equivalent)
> > The general reasoning is that MapCSS could be used to generate maps
> whatever
> > the source dataset, so the syntax should be as generic as possible.
>
> I think we should add them as aliases.
>
> node -> point
> way -> linestring, multilinestring, polygon, multipolygon.
>
Not quite agree. IMHO, a plain way is a linestring, nothing else.
A multilinestring could be something like a "relation[x=y]", where the "x=y"
uniquely defines a sequence of ways.
A polygon is a "way:closed" and nothing else, a multipolygon is a
"relation[type=multipolygon]" and nothing else.
Defining, i.e. "polygon" as an alias to "way" brings no added value.
>
> Reason is that you can't decide on OSM data whether a thing is a line
> or poly without looking on tags. For rendering, you usually want to
>
So? The idea is to generalize the MapCSS syntax. Depending on what data
(e.g. OSM) the style is applied onto, the implementation will have to
interpret it, anyway.
Multilinestring will probably be irrelevant for OSM data but might be used
onto other map data store, by instance.
> style landuse=grass closed, non-closed and multipolygonish the same,
> don't you?
>
It's a valid point. However, with the current spec, I think we have the
problem, too. "landuse=grass" should be rendered the same on "way:closed"
and "relation[type=multipolygon]", while I guess you'd have to tweak the
rendering to display the hole in the multipolygon.
- Chris -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/mapcss/attachments/20100720/f2a68579/attachment.html>
More information about the Mapcss
mailing list