[Tilesathome] Bug with striped rendering
Matthias Julius
lists at julius-net.net
Tue Oct 14 03:08:44 BST 2008
Knut Arne Bjørndal <bob+osm at cakebox.net> writes:
> On Mon, Oct 13, 2008 at 05:16:23PM -0400, Matthias Julius wrote:
>>
>> According to the standard
>> (http://www.w3.org/TR/SVG/coords.html#InitialCoordinateSystem) (0, 0)
>> is in the upper left corner of an SVG. It would be quite confusing if
>> every application defined that differently.
>
> Standards are a nice thing, but... From man inkscape:
> -a x0:y0:x1:y1, --export-area=x0:y0:x1:y1
> In PNG export, set the exported area in SVG user units (anony‐
> mous length units normally used in Inkscape SVG). The default
> is to export the entire document canvas. The point (0,0) is
> the lower-left corner.
Maybe that's a bug in the Inkscape man page ...
>
>> What is different between Inkscape and Batik is that Inkscape wants
>> both coordinates for both upper left and lower right corners and Batik
>> wants upper left corner, width and height of the cut box.
>
> Nope, inkscape wants a different coordinate system, which is the cause
> of some really ugly code which I've now hidden away inside
> CoordinateBox.pm.
This is the old code from before your changes
http://trac.openstreetmap.org/browser/applications/rendering/tilesAtHome_unstable/lib/Tileset.pm?rev=10981:
my ($left, $top) = (0, $stripe_height * $stripe);
$cmd = sprintf("%s%s \"%s\" -z -w %d -h %d --export-area=%f:%f:%f:%f --export-png=\"%s\" \"%s\" > %s",
$Config->get("i18n") ? "LC_ALL=C " : "",
$Config->get("Niceness"),
$Config->get("Inkscape"),
$png_width,
$png_height,
$left, $top, $left + $width, $top + $stripe_height,
$png_file,
$svg_file,
$std_out);
This is going through the stripes from top to bottom just as it is
now.
>
>> I actually did not test this with Batik. Can you or someone else
>> please confirm this works with Batik as well?
>
> I'm running a render on 2110 1178 now, but won't wait for it to
> complete since I'm on my way to bed.
Seems to be OK.
Matthias
More information about the Tilesathome
mailing list