mapper icon indicating copy to clipboard operation
mapper copied to clipboard

import SVG

Open dg0yt opened this issue 12 years ago • 4 comments

mmaddin reported on Sourceforge [tickets:#276]:

It would be nice to be able to import SVG files, e.g. logos.

dg0yt avatar Oct 19 '13 13:10 dg0yt

Somebody posted on Sourceforge:

COOL! It's must be future with "major" priority! SVG must imported as is! Curves in SVG will be imported as Curves into Mapper!

Eugeniy Fedirets

dg0yt avatar Oct 19 '13 19:10 dg0yt

https://github.com/RazrFalcon/resvg seems to be another active open source SVG project with Qt bindings. However, it requires Rust to build.

dg0yt avatar Nov 10 '19 08:11 dg0yt

Hi, I have created a tool for importing SVG. Have a look: https://github.com/rhansson/svg2omap

rhansson avatar Dec 10 '22 01:12 rhansson

There are two possible ways to implement import SVG vector graphics into Mapper:

  1. Import SVG 'as is' with preserving Bézier curves and as much of original vector data as possible.
  2. Import SVG path curves as polygonal chainwith adjustable curves steps (chord tolerance).

As example of the 2nd way implementation, there is "ImportVec" plugin for JOSM which could be used to import (convert) SVG paths as polygons into OSM (GPX, GeoJSON) layer:

  • https://wiki.openstreetmap.org/wiki/JOSM/Plugins/ImportVec
    • https://github.com/JOSM/josm-plugins/tree/master/importvec

Screenshot_2022-12-29_01-06-39

ghost avatar Dec 28 '22 23:12 ghost