Read this text on the blog: http://pgmapcss.openstreetbrowser.org/blog/?p=48 pgmapcss:https://github.com/plepe/pgmapcss
When I attended SOTM-EU in Karlsruhe this year, I was asked by a member of the Osmose project, if pgmapcss could be used as tool for quality assurance. JOSM earlier introduced MapCSS based rules[1] for checking possibly incorrect tags in OpenStreetMap data. Sure, it was possible with pgmapcss – it just needed a few adaptions. The main challenges were to rewrite the output to a machine readable format and to use a different database layout (osm2pgsql does not import the full database, but only features with certain tags). [1] https://josm.openstreetmap.de/wiki/Help/Validator/MapCSSTagChecker Machine readable format ----------------------- Graphical rendering is not the best possible solution, that’s why having machine readable output is more reasonable. I introduced a second frontend, “standalone”: The MapCSS stylesheet is compiled into a python script, which can then be run from the command line or as CGI script. The script will produce GeoJSON output. When testing, this proved to be very powerful, I also implemented a web-based frontend[2] for pgmapcss using OpenLayer 3.0 as feasibility study. There’s an example GeoJSON output in the README[3]. [2] https://github.com/plepe/ol4pgm [3] https://github.com/plepe/pgmapcss/blob/master/README.md Changes in database backend(s) ------------------------------ As second database backend, the pgsnapshot layout from Osmosis is now supported. The main benefit is the completeness of the database, but there are more advantages (there are disadvantages too), e.g. meta information for the map features (like who edited the feature last, when was the last change, and so on). This information is available as pseudo tags: “osm:id”, “osm:user”, “osm:user_id”, “osm:changeset”, “osm:timestamp”, “osm:version”. There’s even an option to use multipolygons using osmosis-multipolygon[4]. The standard “osm2pgsql” backend also got an update. Now it does no longer require the existence of the “tags” column, but rather uses the table columns if available. It will detect the database layout automatically, but you can influence behaviour using configuration options. The pseudo tag “osm:id” is now also set. pgmapcss now generates improved SQL selects, especially for conditions with e.g. regular expressions, prefix/suffix matches, … For more details see the database documentation[5]. [4] https://github.com/plepe/osmosis-multipolygon [5] https://github.com/plepe/pgmapcss/blob/master/doc/database.md Additional features ------------------- * Localization support. There’s certain support for languages, read the corresponding chapter in the README. * Drastically reduced memory consumption. * New debugging options, see configuration options[6]. [6] https://github.com/plepe/pgmapcss/blob/master/doc/config_options.md Other ----- * The background rendering of OpenStreetBrowser[7] now uses a pgmapcss based style[8]. [7] http://openstreetbrowser.org/ [8] https://github.com/plepe/OpenStreetBrowser-basemap Have fun! 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: [email protected] > Blog: plepe.at | | > Twitter: twitter.com/plepe > Jabber: [email protected] | `---------------------------------------------------------------------' _______________________________________________ dev mailing list [email protected] https://lists.openstreetmap.org/listinfo/dev

