Hi Dave,
On 10/20/05, *David Blasby* <dblasby@anonymised.com <mailto:dblasby@anonymised.com>> wrote:
Justin,
I briefly looked at the SVG stuff. Its gonna take a long time to get
really nice. Heck, the entire WMS needs a lot of work. I do have a
soft spot for SVG as I think its going to be pretty cool.1. When I run it out-of-the-box("Simple (Fast, but limited styling)"
mode), I get this error:1026187 [INFO] org.vfny.geoserver.servlets.AbstractService - Had an
undefined error: UNCAUGHT exception: No SVG Feature writer defined for
class com.vividsolutions.jts.geom.Geometry
Looking at the Fast SVG Renderer, it doesn't do feature types where the type is a geometry, and not one of its concreate subtypes. I would imagine that your dataset is heterogeneous?
I will have to look a little closer at the code but I dont think this will be too hard to handle. Basically we could create another svg handler that would handle the GeometryClass, and then when it actually is writing an instance it can delegate to one of the concrete writers.
Created a jira task: http://jira.codehaus.org/browse/GEOS-426
2. I changed it to the batik renderer and got an error. Tracking back,
i think it has to do with this:System does not support the specified encoding. Error processing
resource 'file:///C:/Documents and Settings/david blasby/D...<?xml version="1.0" encoding="Cp1252"?>
This is fixed, it wasn't specifying an encoding so you were getting a default, not it defaults to UTF-8.
3. I removed the <?xml> line and then got this error:
The system cannot locate the resource specified. Error processing
resource 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/.
<http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/.>\.\.The first line of the file is:
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd
<http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd>'>The XML spec says that all <!DOCTYPE> entities MUST always be
resolved. I'm currently not on the internet so this is probably whats
happening here.4. I removed that and now it doesnt render as SVG. I'm gonna go back
to the internet cafe and plug in.Okay, so what I had to do to get this to work:
0. connect to the internet !! (this shouldnt be a requirement but we
might not be able to get away without it)
I agree that the internet shouldn't be a requirement, i will look a little further into how to remove this.
http://jira.codehaus.org/browse/GEOS-427
1. download the SVG file from the server
2. edit it and change its encoding to "UTF-8"
3. rename the file to ".svg" -- this is also *required* probably
because of weird content-type handling and the way windows determines
types.
4. drag-and-drop it into IE (with the adobe plugin)AND I GET AN IMAGE! It even works well with multiple layers and
labeling!The only thing that sucks is the fact that its not antialiased.
Anyways you can change the encoding and tell it to anti-alias?
Done. Antialiasing is the default, but is changeable in the config.
dave
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org