[OSM-dev] Mapnik styles
Nick Black
nickblack1 at gmail.com
Fri May 11 16:51:17 BST 2007
Hello Sebastian.
On 5/11/07, Sebastian Spaeth <Sebastian at sspaeth.de> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I am working my way through OSM trac tickets as long as everything is
> dead and noticed ticket 398 (http://trac.openstreetmap.org/ticket/398)
Maybe we should kill the servers more often.
> Currently, highway=track renders the same as highway=cycleway in
> > Mapnik. I suggest showing them with a kind of brown color as in
> > Osmarender.
>
> I confirmed that they indeed look identical, and agree that they should
> be distinguishable. As far as I understand is Artem the Mapnik guy.
> Would that be a change that you can agree with? Would you do that? I hae
> no clue where the relevant files are stored and how Mapnik works.
Artem is indeed the 'Mapnik' guy. Mapnik reads an XML config file that is
found here:
http://trac.openstreetmap.org/browser/applications/rendering/mapnik/osm.xml
You'd be looking for this bit:
<Rule>
1147 <Filter>[highway] = 'cycleway' or [highway] = 'track'</Filter>
1148 <MaxScaleDenominator>50000</MaxScaleDenominator>
1149 <LineSymbolizer>
1150 <CssParameter name="stroke">white</CssParameter>
1151 <CssParameter name="stroke-width">6</CssParameter>
1152 <CssParameter name="stroke-linejoin">round</CssParameter>
1153 <CssParameter name="stroke-linecap">round</CssParameter>
1154 <CssParameter name="stroke-opacity">0.4</CssParameter>
1155 </LineSymbolizer>
1156 <LineSymbolizer>
1157 <CssParameter name="stroke">salmon</CssParameter>
1158 <CssParameter name="stroke-width">2.0</CssParameter>
1159 <CssParameter name="stroke-dasharray">4,4</CssParameter>
1160 <CssParameter name="stroke-linejoin">round</CssParameter>
1161 <CssParameter name="stroke-linecap">round</CssParameter>
1162 </LineSymbolizer>
1163 </Rule>
It should be reasonably self explanatory - shout out if it isnt.
If you have mapnik installed, there is a python script called
generate_tiles.py that talks to Mapnik and produces image tiles. Mapnik
reads data from a PostGIS database, so you'll need to have OSM data in
PostGIS. These resouces might help:
http://trac.openstreetmap.org/browser/applications/rendering/mapnik/generate_tiles.py
- Tile generation script
http://wiki.openstreetmap.org/index.php/Mapnik - Mapnik
Good luck with trac...
Spaetz
>
> P.S As a side note: trac has a slippy_map but no mapnik component.
> Should there be one to mark mapnik issues as such or is it overkill?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGRIwBbtVRNeSDtgERApRiAKDjEufu9venPGnfB5YYG4B9bcGjUACaAxI2
> KyKskCiNVYXjVs6FhB4VZ0E=
> =kUl8
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>
--
Nick Black
--------------------------------
http://www.blacksworld.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20070511/0c0b4400/attachment.html>
More information about the dev
mailing list