Opened 9 years ago

Closed 5 years ago

#3122 closed defect (invalid)

Use vector icons instead of bitmaps

Reported by: stanton Owned by: mapnik-team@…
Priority: major Milestone:
Component: mapnik Version:
Keywords: Cc:

Description

Mapnik currently uses bitmap icons to represent points of interest, public transport stops, access restrictions, one-way streets and possibly more.

This becomes a problem when exporting Mapnik-rendered maps to SVG or other vector formats (PDF, Postscript):

  • Bitmap icons don't scale. When printing a map that is intended to be enlarged (such as a site map at a park entrance), the icons will come out grainy.
  • Most SVG renderers have huge problems with bitmaps - either they are not supported and will thus be ignored, or there are bugs when rendering or exporting. (The only applications I know which render them correctly on screen are Inkscape and Firefox, and neither manages to correctly export a Mapnik SVG file to any other vector format.) As a result, is is practically impossible to get a vector map out of Mapnik and reuse it in some program (for example, embedding a map image in a DTP application).

Suggested solution: replace the bitmap icons with vector graphics.

If this is a limitation in Mapnik, let me know and I'll open a ticket for Mapnik (and we'll suspend this one until Mapnik supports what we need.)

Change History (3)

comment:1 Changed 9 years ago by stanton

Did some research... the last official build (0.7.1) has no SVG support but build 1793 supports it for PointSymbolizer?, ShieldSymbolizer? and MarkersSymbolizer?. That would already ease a lot of problems.

What remains open would be LinePatternSymbolizer? and PolygonPatternSymbolizer?. These as of now support only raster images. Maybe there's a workaround (at least for PolygonPatternSymbolizer?) to render polygons as a single-colored area in the background color of the raster image and the PolygonPatternSymbolizer? on top? That way SVG renderers which do not handle bitmaps would at least render something close to it.

What version of Mapnik does OSM currently use?

comment:2 Changed 9 years ago by Ldp

All SVG development is going on in trunk, which will someday be a 0.8 release, or even 1.0. The 0.7.x releases will not have it. As such this is not useful for OSM in the short run.

The osm.org server is currently on 0.7.2-dev, as far as I recall. I do not foresee a switch to a mapnik version with SVG support this year.

comment:3 Changed 5 years ago by math1985

Resolution: invalid
Status: newclosed

This issue should be reported at the Mapnik developers: https://github.com/mapnik/mapnik

Paradoxically, the Mapnik category here is only for the Mapnik stylesheet used on openstreetmap.org, not for issues with mapnik itself.

I will close this issue now.

Note: See TracTickets for help on using tickets.