I've finished support for external files in orp (it's in svn now). I've also moved symbol-bus from z17 to symbols/bus.svg as an example. Symbols scaling works as well, but it scales all symbols in stylesheet, so I will have to modify all symbols in z16 before bus symbol can be shared between z16 and z17.
If nobody complains I will start moving symbols to external files later. On Sun, Aug 10, 2008 at 2:32 PM, Jiri Klement <[EMAIL PROTECTED]> wrote: >>> Stylesheets are a bit confusing but it seems that pixels in >>> stylesheets actually represent rendered pixels. Even if I'm wrong, >>> global transformation can be defined for svg file so 1 unit = 1 >>> rendered pixel. >> >>This is not as used in osmarender. Line widths get smaller for higher >>zoom levels, often by factor 0.5 resulting in the same rendered width. > > You're right, I got confused by sligtly obfuscated symbol definition before. > >>What is a pixel in SVG anyway? > > It depends on size of image, viewbox and rendered size. In case of > osmarender is every svg file big about 878.91*878.91 ((360 / number > of z12 tiles)*10000). Size of rendered image is 256 for z12, 512 for > z13, ... > So 1 rendered px should be: > 3.42 units for z12 > 1.71 units for z13 > > I think it is possible to switch to 1 unit = 1 rendered pixel, but it > would mean to change orp/osmarender to convert all nodes/ways > coordinates and rewrite all stylesheets. > > >>> Frederik: I think I saw something about this not being implemented in >>> or/p? If not it shouldn't be too hard to fix, you can probably find >>> examples of how this used to be done by looking at some fairly old svn >>> revisions. >> >> Yes, there was a bit of code in the SVG that I did not understand and >> that wasn't obviously used. Maybe one can even produce .svg files that >> simply href external symbols? > > It should be possible as href is just normal URI. Anyway the > osmarender code is quite simple: > - get list of all referenced symbols > - read svg file <symbolsDir>/<nameOfSymbol>.svg > - extract symbol from svg file (element with address > svg:svg/svg:defs/svg:symbol) > _______________________________________________ Tilesathome mailing list [email protected] http://lists.openstreetmap.org/listinfo/tilesathome
