[Tilesathome] less inkscape runs
Alfons Andorfer
a_a at gmx.de
Fri Aug 22 12:30:43 BST 2008
spaetz wrote:
> On Thu, Aug 21, 2008 at 09:19:26PM +0200, Alfons Andorfer wrote:
>> Yes, it really _is_!
>
> Good to know.
>
>> > Worthwhile exploring?
>
>> I've called it "osm2tiles.pl" and you can get it if you want. (I already
>> sent it to Frederik, but didn't hear back from him yet)
>
> Frederik sent it to me, that's how I got the idea. SO credits for this go really to you :-)
>
>> In my script this error is 0 ("zero") because I also changed the
>> projection formula (from orp.pl) slightly.
>
> I would be very much interested in an improved project to orp that enabled us to simply cut the resulting svg in equal stripes (and tiles).
> The same change would be needed for xslt osmarender though, to keep
> them on par. Is there an isolated diff that does this for orp? This
change would be useful on its own already.
OK, here is the diff for "orp.pl":
line 127:
+ require "tahproject.pm";
line 309:
- our $dataHeight = ($maxlat - $minlat) * 10000 * $scale * $projection;
+ our $dataHeight = ( RadToDeg(ProjectF($maxlat)) -
RadToDeg(ProjectF($minlat)) ) * 10000 * $scale;
line 1065:
- $width - ($maxlon-$latlon->[1])*10000*$scale,
+ $height + ($minlat-$latlon->[0])*10000*$scale*$projection
$height + ( ProjectF($minlat) - ProjectF($latlon->[0]) ) *180/pi
*10000*$scale # PRO
And "tilesgen.pl" needs to be patched also then.
Another issue is that in my performance investigation I discovered that
batik does not behave well in regards of redering speed (SVG->PNG), i.e.
that creating big PNGs with inkscape took about 2 mins for a specific
file, the same file being processed with batik took over 30 mins!
Alfons
More information about the Tilesathome
mailing list