Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Use vector icons instead of bitmaps #3122

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 3 comments
Closed

Use vector icons instead of bitmaps #3122

openstreetmap-trac opened this issue Jul 23, 2021 · 3 comments

Comments

@openstreetmap-trac
Copy link

Reporter: stanton
[Submitted to the original trac issue database at 9.01pm, Wednesday, 14th July 2010]

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.)

@openstreetmap-trac
Copy link
Author

Author: stanton
[Added to the original trac issue at 2.36pm, Friday, 16th July 2010]

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?

@openstreetmap-trac
Copy link
Author

Author: Ldp
[Added to the original trac issue at 12.40am, Tuesday, 3rd August 2010]

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.

@openstreetmap-trac
Copy link
Author

Author: math1985
[Added to the original trac issue at 2.12pm, Monday, 31st March 2014]

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant