From OpenStreetMap Wiki
< JOSM‎ | Plugins
Jump to: navigation, search
Available languages — JOSM/Plugins/ImportVec
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Basa Jawa Baso Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen Kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk bokmål norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português português do Brasil română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް
JOSM with Ubuntu logo imported from SVG

ImportVec allows you to import SVG files into JOSM.

Example for a circle:

  • Use a suitable graphics program (e.g. Inkscape) to create a picture of a circle 100 pixels in diameter and save it as SVG. Alternatively download 'Circle100.svg' sample file
  • In JOSM select "File->New Layer"
If you're getting data from SVG to put into OpenStreetMap then you would download the relevant area of the map at this stage, but for now let's just start a blank data layer.
  • Select the file with "File-> Open..."
  • Set the size ratio
For this example the circle is 100 pixels wide. With 1:1 scale selected, you will get in a circle 100 meters in diameter in JOSM, with 2:1 selected you would get a 50 meter wide circle, with 1:2 selected you would get a 200 meter wide circle, etc.
  • Set "Curve steps"
This lets you control the number of nodes generated to represent curved lines (i.e. arcs of circles, and quadratic or bicubic splines) of the SVG.
For our circle SVG, choosing "1" would give you a square, "2" an octagon, "3" starts to look more circular (in other words the angles in corners of the polygon generated from a circle will be set to a minimum of 90/2curve steps degrees, i.e. 90° for 1 curve step, or 45° for 2 curve steps, or 22.5° for 3 curve steps, or 11.25° for 4 curve steps, or 5.625° for 5 curve steps; the default number of curve setps is set to 4, so a circle would be converted to a closed polygon with 16 straight vertices connecting 16 nodes).
Generally you would want to adjust this to a higher number if your SVG has larger diameter curves. Try to follow OpenStreetMap norms for the number of nodes you use.
Note that existing straight segments of polygonal paths in the SVG are not affected by this setting.
  • Click OK to run the import
  • Move and resize
The SVG data is initially placed centrally on the visible map area. Select the data and drag to move it to the right place. You can also make scale adjustments by holding down Ctrl and Alt keys while dragging.
  • Upload or export
JOSM treats the new data as if you had drawn new nodes and ways in the editor, so you can click 'upload' to send the data to the OpenStreetMap database and have it appear on the map (you'll need to add tags first too) Don't do this if you were just messing around! Don't do it if you just wanted to convert the data. You can save the data layer from JOSM to a .osm file for processing elsewhere.