[Mapcss] [OSM-dev] Introducing PGMapCSS 0.2.0

Stephan Bösch-Plepelits skunk at xover.htu.tuwien.ac.at
Fri Aug 23 10:20:25 UTC 2013


On Fri, Aug 23, 2013 at 11:52:02AM +0300, Jukka Rahkonen wrote:
> You can have several classes in a mapfile and classes can contain several
> styles. Layers, classes, and styles can all have scale denominators.
> Example showing many classes and styles per one database query
> http://latuviitta.org/tyylikirjasto/pg_roadsclose_10k_i.map
> This mapfile renders OSM highway layer.
Oh, that looks really good. After reading the documentation I thought that
you can have only one class per layer.

There's still a tiny bitt missing: I found that you can insert a "!BOX!"[1]
in the database query as replacement pattern for the bounding box, but I
haven't found anything that you can do the same for the scale denominator.
PGMapCSS uses the current scale denominator for zoom level queries and unit
conversions.

Anyway, I will look into it and try to come up with a suiting MapServer map
file (maybe with a fixed scale denominator, so as the result is not zoom
level dependend). I guess that the scale denominator could easily be added
as replacement pattern to MapServer.

> Geoserver supports using SQL queries for selecting data nowadays
> http://docs.geoserver.org/stable/en/user/data/database/sqlview.html
> The name "sqlview" is misleading.
It's the same here, you can't insert BBOX and SCALE_DENOMINATOR in the
database query. This is the kind of database query that PGMapCSS likes to
use:
  select * from test_match(pgmapcss_render_context(BBOX, SCALE_DENOMINATOR));

where test_match is a function generated by PGMapCSS which queries all
features for the current zoom level from the database, and does all the
calculating for the resulting symbols. BBOX and SCALE_DENOMINATOR need to
be replaced by the renderer but their current values.

> Geoserver implements the SLD standard and filter capabilities can be read
> from http://portal.opengeospatial.org/files/?artifact_id=1188
PGMapCSS is not a pre-processor that generates an SLD stylefile from the
input style, but processes the input features itself and generates
parameters for symbolizers.

[1] http://mapserver.org/input/vector/postgis.html

Thanks for your input concerning MapServer!

greetings,
        Stephan
-- 
Seid unbequem, seid Sand, nicht Öl im Getriebe der Welt! - Günther Eich
,---------------------------------------------------------------------.
| Stephan Bösch-Plepelits,                                            |
| Technische Universität Wien   -    Studien Informatik & Raumplanung |
| Projects:                                                           |
| > openstreetbrowser.org > couchsurfing.org > tubasis.at > bl.mud.at |
| Contact:                                                            |
| > Mail: skunk at xover.mud.at > Blog: plepe.at                         |
| > Twitter: twitter.com/plepe > Jabber: skunk at jabber.at              |
`---------------------------------------------------------------------'



More information about the Mapcss mailing list