[OSM-talk] talk Digest, Vol 44, Issue 85

elvin ibbotson elvin.ibbotson at poco.org.uk
Tue Apr 22 09:58:21 BST 2008


On 21 Apr 2008, at 18:00, tom at compton.nu wrote:

>
> From: Tom Hughes <tom at compton.nu>
> Date: 21 April 2008 14:48:56 BDT
> To: talk at openstreetmap.org
> Subject: Re: [OSM-talk] SVG tiles
>
>
> In message <D89BADA3-5190-458A-AB1F-3D66EB4C8262 at poco.org.uk>
>         elvin ibbotson <elvin.ibbotson at poco.org.uk> wrote:
>
>> I had been intending to get round to mailing this list enquiring if
>> SVG downloads were possible/available when the Export tab appeared.
>> My initial delight** was slightly diminished when I exported a map in
>> two formats - SVG and PNG - and found the SVG version was 340kB while
>> the PNG file was 132kB. A glance at the SVG data suggests that text
>> is actually drawn (sometimes more than once (for background then
>> again for the text itself) using long, elaborate paths and shape
>> definitions of every character at every orientation and size, rather
>> than just using the SVG text element!!! I suspect it also
>> incorporates bitmap images as icons rather than using SVG
>> definitions. I think SVG is the way forward, but not if the file
>> sizes end up almost three times bigger than bitmaps!
>
> Some of the text is drawn twice in order to get the halo effect
> that our mapnik stylesheet uses. The icons are bitmaps because, as
> I believe I explained yesterday, mapnik does not (currently) support
> vector symbols. If you want to help with that I'm sure Artem will be
> pleased to here from you.
>
> Everything else is essentially down to cairo, which is the rendering
> library that mapnik uses to render vector maps. I ask it to render
> text using a given font and if it chooses to convert that to a path
> then that is because it thinks it isn't possible to do it as a text
> render for some reason.
>
> In general terms SVG is pretty verbose anyway, so it's not at all
> clear to be that it's ideal for what you are doing.
>
> I would also point out that the export service was really designed
> for people doing one of exports and not to act as a back end for the
> sort of thing you're doing and it is unlikely to scale well to
> supporting large scale use of that sort.

Fair enough! It sounds like SVG export from Mapnik/Cairo is a little
sub-optimal :-) I wasn't suggesting applications somehow used the
export service but that SVG tiles should be available alongside (and
ultimately instead of?) bitmap tiles

>
>> I suggest that, if has not already been done and is hidden somewhere
>> I haven't looked, that a server should be dedicated to scalable map
>> tiles using a compact and efficient implementation of SVG coding.
>
> Sure. I'll just look in the cupboard marked "spare servers" and pull
> out a server for you. Then I'll go write stack of code and deploy and
> manage it for you.

Great, thanks.

>
> Seriously. You want it, you write it.

Aw shucks. You guys are so much better at it than me.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20080422/43353c4e/attachment.html>


More information about the talk mailing list