[OSM-talk] osmarender SVG in .Net

Brent Easton b.easton at exemail.com.au
Tue Oct 30 20:19:20 GMT 2007


Hi Thom,

The standard version of batik-reasterizer.jar has no error handling whatsoever. If it encounters an error in the generated SVG, it just throws an exception and fails.

Regards,
Brent.

*********** REPLY SEPARATOR ***********

On 30/10/2007 at 3:27 PM Thom Shannon wrote:
brilliant! thank you!!

How come that isn't in the main repository? Did they not accept your patches?

Dodi wrote: 
try it again with osmarender from http://www.freemap.sk/osmarender6.zip  :)

Dodi

----- Original Message ----- 
From: Thom Shannon 
To: talk at openstreetmap.org 
Sent: Tuesday, October 30, 2007 1:59 PM
Subject: Re: [OSM-talk] osmarender SVG in .Net


batik really doesn't want to work, I can render out a small svg with about half a dozen streets on it, but anything bigger and I get IllegalPathStateException from batik-rasterizer.jar, details below. I'm guessing there is an object somewhere near the middle of liverpool that is messed up.

Converting output.svg to C:\osm\output.png ... java.awt.geom.IllegalPathStateException: missing initial moveto in path definition
        at java.awt.geom.GeneralPath.needRoom(Unknown Source)
        at java.awt.geom.GeneralPath.lineTo(Unknown Source)
        at org.apache.batik.ext.awt.geom.ExtendedGeneralPath.lineTo(Unknown Source)
        at org.apache.batik.parser.AWTPathProducer.linetoAbs(Unknown Source)
        at org.apache.batik.dom.svg.SVGAnimatedPathDataSupport.handlePathSegList(Unknown Source)
        at org.apache.batik.bridge.SVGPathElementBridge.buildShape(Unknown Source)
        at org.apache.batik.bridge.SVGShapeElementBridge.createGraphicsNode(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
        at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
        at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source)
        at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
        at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
        at org.apache.batik.apps.rasterizer.SVGConverter.transcode(Unknown Source)
        at org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown Source)
        at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source)
        at org.apache.batik.apps.rasterizer.Main.main(Unknown Source)
.... error (SVGConverter.error.while.rasterizing.file)

Brent Easton wrote: 
Hi Thom,

I can't help you with .NET, but I just wanted to let you know that I have successfully rendered the SVG's using Batik and got the same output as from Inkscape. Just want to reassure you that there is nothing 'funny' about the SVG format.

I have come accross SVG libraries in the past that only render a subset of the SVG operators, which produce strange results when run over SVG's containing the full set. Can't comment on SharpVectors though.

Regards,
Brent.

*********** REPLY SEPARATOR  ***********

On 29/10/2007 at 10:17 PM Thom Shannon  wrote:

  
I'm trying to render SVG to raster in .net, I'm using the SharpVectors 
lib but it just can't render the osmarender svgs. Has anyone tried this 
before?

It seems to render various elements as solid black objects. The 
background rectangle fills the page black, if I remove that then ways 
are just solid black shapes.
    

____________________________________________________________
Brent Easton                       
Analyst/Programmer                               
University of Western Sydney                                   
Email: b.easton at uws.edu.au


_______________________________________________
talk mailing list
talk at openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


  




_______________________________________________
talk mailing list
talk at openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk



-- 
*** OPEN COFFEE 6 - with FACT - http://upcoming.yahoo.com/event/307022 ***

Glow New Media
t: 0151 707 9770
m: 07730 987 574
www.glow-internet.com

Suite 712 Gostins Building
32-36 Hanover Street
Liverpool
L1 4LN

Map: http://tinyurl.com/2f5nxd 
____________________________________________________________
Brent Easton                       
Analyst/Programmer                               
University of Western Sydney                                   
Email: b.easton at uws.edu.au

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20071031/3a5a13ac/attachment.html>


More information about the talk mailing list