Parse SVG XML files

sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM ModeratorPosts:2,959Community Manager
edited December 2018 inProduct Feedback - Resolved

Hi...I'd love to see a way for the "Read XML" operator to be adapted so that it can easily read SVG vector image files, broken down by image, subimage, segment, etc... It would be a great way to do image analysis!!

FYI I know there is a Java SVG parser publicly available...could this be used?:)https://xmlgraphics.apache.org/batik/

Scott

Thomas_Ott matthew_miller
2
2 votes

Declined·Last Updated

Sorry Scott - only two votes since May 2017. Better luck next time. Declined PROD-825

Comments

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University ProfessorPosts:3,383RM Data Scientist

    Hi Scott,

    how would the resulting table look like?

    ~Martin

    - Head of Data Science Services at RapidMiner -
    Dortmund, Germany
  • sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM ModeratorPosts:2,959Community Manager

    Excellent question:)Here's what I think would make sense..

    Original XML SVG file:


    < !DOCTYPE svg公共”——/ / W3C / / DTDSVG 1.1//EN"
    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
    xmlns="http://www.w3.org/2000/svg" version="1.1">
    Example triangle01- simple example of a 'path'
    A path that draws a triangle
    fill="none" stroke="blue" />
    fill="red" stroke="blue" stroke-width="3" />

    Output:

    Width, title, desc all in metadata - only paths in example set:

    path command x y x1 x2 y1 y2 width height fill stroke stroke-width

    rect 1 1 398 398 none blue

    d M 100 100

    d L 300 100

    d L 200 300

    d z red blue 3

    The key for me here is both to break out the shapes AND to de-pivot the paths.


    Scott

Sign InorRegisterto comment.