plepe / pgmapcss

PGMapCSS is a library for PostgreSQL/PostGIS which works between an osm2pgsql based database and Mapnik (and maybe other renderers). It processes database (usually OpenStreetMap) objects according to MapCSS rules and calculates resulting colors, widths and other properties for Symbolizers, even geometric modifications.
GNU Affero General Public License v3.0
35 stars 8 forks source link

How to define geometric modifiers #1

Closed plepe closed 11 years ago

plepe commented 11 years ago

PGMapCSS could change the geometric representation of an object, e.g.:

The main question is: how to define this alteration in the CSS file:

1) Treat geometry as property which is already pre-defined.

node[place=city] {
  geo: eval(buffer(prop(geo), 10px));
}

Not bad, but might be confusing (my favorite right now).

2) Treat geo as tag of the object

node[place=city] {
  set geo=eval(buffer(tag(geo), 10px));
}

This would change the geometry for all pseudo elements, which might not be desired.

3) Special syntax, e.g.

node[place=city] {
  geo(eval(buffer(geo, 10px))); 
}

I would be interested in your thoughts on this subject.

plepe commented 11 years ago

I decided to use variant 1. It has already been added in v0.2.0.