Modify

Opened 6 years ago

Closed 6 years ago

#8742 closed defect (fixed)

Cannot import SVG files generated with Microsoft Visio

Reported by: musle@… Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: svg microsoft visio Cc:

Description (last modified by Don-vip)

I can not import svg that from visio2013 export svg file

ref the file content:

<!-- 由 Microsoft Visio, SVG Export 產生 testsvg.svg 頁-1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"
                xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="7.32948in" height="6.09843in"
                viewBox="0 0 527.722 439.087" xml:space="preserve" color-interpolation-filters="sRGB" class="st25">
        <v:documentProperties v:langID="1028" v:metric="true" v:viewMarkup="false"/>

        <style type="text/css">
        <![CDATA[
                .st1 {fill:#ff0000;stroke:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
                .st2 {fill:#ffffff}
                .st3 {stroke:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
                .st4 {fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24}
                .st5 {fill:#ffffff;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75;visibility:hidden}
                .st6 {fill:none}
                .st7 {stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
                .st8 {fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
                .st9 {fill:none;stroke:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
                .st10 {fill:#000000;font-family:新細明體;font-size:0.162231em}
                .st11 {fill:#000000;font-family:新細明體;font-size:0.194687em}
                .st12 {stroke:#000000;stroke-linecap:butt;stroke-width:0.75}
                .st13 {fill:#0000ff;stroke:#0000ff;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
                .st14 {fill:none;stroke:#0000ff;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
                .st15 {fill:#0000ff;font-family:Arial Unicode MS;font-size:0.259575em}
                .st16 {fill:#0000ff;font-family:新細明體;font-size:0.324463em}
                .st17 {font-size:1em}
                .st18 {fill:none;stroke:#000000;stroke-linecap:butt;stroke-width:0.75}
                .st19 {stroke:#0000ff;stroke-linecap:butt;stroke-width:0.75}
                .st20 {stroke:#00ff00;stroke-linecap:butt;stroke-width:0.75}
                .st21 {stroke:#4c4400;stroke-linecap:butt;stroke-width:0.75}
                .st22 {stroke:#ff0000;stroke-linecap:butt;stroke-width:0.75}
                .st23 {fill:#ffffff;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72}
                .st24 {fill:#000000;font-family:新細明體;font-size:0.666664em}
                .st25 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}
        ]]>
        </style>

        <g v:mID="0" v:index="1" v:groupContext="foregroundPage">
                <title>頁-1</title>
                <v:pageProperties v:drawingScale="0.19685" v:pageScale="0.0393701" v:drawingUnits="24" v:shadowOffsetX="8.50394"
                                v:shadowOffsetY="-8.50394"/> .....

Does the svg support visio export svg files?

Thanks a lot
musle 5/26

Attachments (2)

svg_test.vsd (127.0 KB) - added by musle@… 6 years ago.
visio file
svg_test.zip (7.6 KB) - added by musle@… 6 years ago.
save as svg file from visio

Download all attachments as: .zip

Change History (11)

comment:1 Changed 6 years ago by bastiK

How do you import the svg file into JOSM?

Please add the file as an attachment.

Changed 6 years ago by musle@…

Attachment: svg_test.vsd added

visio file

Changed 6 years ago by musle@…

Attachment: svg_test.zip added

save as svg file from visio

comment:2 in reply to:  1 Changed 6 years ago by Don-vip

Component: CorePlugin importvec
Keywords: microsoft visio added
Owner: changed from team to Upliner
Summary: I can not import svgCannot import SVG files generated with Microsoft Visio

Replying to bastiK:

How do you import the svg file into JOSM?

Likely with http://wiki.openstreetmap.org/wiki/JOSM/Plugins/ImportVec

comment:3 Changed 6 years ago by Don-vip

Description: modified (diff)

comment:4 Changed 6 years ago by Don-vip

Exception thrown when opening this file:

Build-Date: 2013-05-29 00:31:02
Revision: 5971
Is-Local-Build: true

Identification: JOSM/1.5 (5971 SVN en_GB) Windows 8 64-Bit
Memory Usage: 229 MB / 1813 MB (95 MB allocated, but free)
Java version: 1.7.0_21, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
VM arguments: [-Dfile.encoding=UTF-8]

Plugin: importvec (29435)

java.io.IOException: Can't find root SVG element
	at org.openstreetmap.josm.plugins.importvec.ImportVectorAction$ImportTask.realRun(ImportVectorAction.java:262)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:145)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)

comment:5 Changed 6 years ago by Don-vip

Bug in svgsalamander, I have created an issue: https://java.net/jira/browse/SVGSALAMANDER-25

Will need to be fixed in JOSM core by upgrading svgsalamander to latest revision.

comment:6 in reply to:  5 Changed 6 years ago by bastiK

Replying to Don-vip:

Bug in svgsalamander, I have created an issue: https://java.net/jira/browse/SVGSALAMANDER-25

Will need to be fixed in JOSM core by upgrading svgsalamander to latest revision.

Thanks!

We could package the alternative SVG library Apache Batik as a plugin. Then it could be used by other plugins such as importvec.

Batik is too large to be included in core, but it might be more stable.

comment:7 Changed 6 years ago by Don-vip

First bug has been fixed, leading to another one: https://java.net/jira/browse/SVGSALAMANDER-26

comment:8 Changed 6 years ago by Don-vip

Component: Plugin importvecCore
Owner: changed from Upliner to team

comment:9 Changed 6 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 6002/josm:

fix #8742 - update svgsalamander to release 0.1.18+patch (fix bug SVGSALAMANDER-26) -> allow to open more SVG files

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.