Hi there
I am trying to the load the SVG file found here (
http://upload.wikimedia.org/wikipedia/commons/5/5f/USA_Counties_with_FIPS_and_na...). I have added the file to my instance (sketch Add File) and have the following code:
Code:
import processing.candy.*;
import processing.xml.*;
PShape s;
void setup()
{
int width = 556;
int height = 352;
s = loadShape("USA_Counties.svg");
noLoop();
}
void draw()
{
shape(s,10,10,width,height);
}
Processing reports "shape command not handled" with the dump of:
Code:
Ignoring <metadata> tag.
Ignoring <sodipodi:namedview> tag.
parsed: M,82.37398,5.202,L,82.62298,5.9,L,82.74798,6.436,L,82.99598,8.907,L,82.97398,9.056,L,82.20798,9.614,L,82.06398,9.655,L,81.16198,9.488,L,80.68398,9.506,L,77.84098,8.735,L,70.64298,6.676,L,67.75798,5.869,L,67.56798,5.851,L,67.54198,4.905,L,66.73898,3.719,L,65.99098,2.052,L,65.84698,1.389,L,65.85198,1.344,L,65.93298,1.217,L,66.16698,1.033,L,66.40998,0.893,L,66.58598,0.794,L,69.49298,1.628,L,72.03498,2.353,L,74.89298,3.214,L,80.08498,4.584,L,82.37398,5.202,M,63.84098,2.026157e
unparsed: -014,L,63.89498,0.014,L,64.29698,0.131,L,64.32298,0.469,L,64.25598,0.492,L,63.80498,0.329,L,63.84098,2.026157e,-014
Exception in thread "Animation Thread" java.lang.RuntimeException: shape command not handled: -014
at processing.core.PShapeSVG.parsePath(PShapeSVG.java:690)
at processing.core.PShapeSVG.parseChild(PShapeSVG.java:324)
at processing.core.PShapeSVG.parseChildren(PShapeSVG.java:264)
at processing.core.PShapeSVG.<init>(PShapeSVG.java:254)
at processing.core.PShapeSVG.<init>(PShapeSVG.java:152)
at processing.core.PShapeSVG.<init>(PShapeSVG.java:144)
at processing.core.PApplet.loadShape(PApplet.java:3645)
at first.setup(first.java:33)
at processing.core.PApplet.handleDraw(PApplet.java:1402)
at processing.core.PApplet.run(PApplet.java:1327)
at java.lang.Thread.run(Thread.java:613)
I am rather confused, could you shed some light on this?