Hello,
I'm using the GeoTools package for my master thesis and I believe I have
found a bug at the GenerateSVG class.
The method renderMap() reads
private void renderMap(final MapContext map, final Envelope env, final
SVGGraphics2D g2d) throws IOException {
LiteRenderer renderer = new LiteRenderer(map);
Rectangle outputArea = new Rectangle(g2d.getSVGCanvasSize());
Envelope dataArea = map.getLayerBounds();
AffineTransform at = renderer.worldToScreenTransform(dataArea,
outputArea);
LOGGER.finest("rendering map");
renderer.paint(g2d, outputArea, at);
}
But the line #100 should actually be
Envelope dataArea = env;
Because the Envelope parameter is supposed to be the portion of the map
we want in the SVG file. If we use map.getLayerBounds() we simply get
the whole map. I've tested my modification.
In other words the whole method could be written as:
private void renderMap(final MapContext map, final Envelope env, final
SVGGraphics2D g2d) throws IOException {
LiteRenderer renderer = new LiteRenderer(map);
Rectangle outputArea = new Rectangle(g2d.getSVGCanvasSize());
AffineTransform at = renderer.worldToScreenTransform(env,
outputArea);
LOGGER.finest("rendering map");
renderer.paint(g2d, outputArea, at);
}
I hope I've been clear enough.
--
Patrick Dessalle
patrick.dessalle_(a)_ulb.ac.be
IT Engineer Student at ULB (Université Libre de Bruxelles)
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel