[Tilesathome] Problems in tilesGen.pl on Win32 and Italian locale

Luca Boschetto l.boschetto at gmail.com
Mon Sep 15 14:56:10 BST 2008


Hello everybody,

I'm just starting to try to help with T at H – just as a renderer,
because I don't have enough skills to help as a coder (anymore).

I run into this problem when running tilesGen.pl (rev. 10700) under
Win32 on an Italian locale: although I set InkscapeLocale = german in
tilesAtHome.conf -- which indeed makes Inkscape work under my locale
-- I still get errors in orp/orp.pl:
C:\Program Files\tilesAtHome>perl tilesGen.pl xy 2233 1359 12
- Using working directory C:\temp
! 'flock' not available. Do not run concurrent uploads
- Pngcrush version 1.6.4
- pngnq version 0.5
- Inkscape version 0.46
- rendering using or/p
- Using http://tah.openstreetmap.org/Request/take/ for Requests
downloaded 10 bytes
This is version 10416 (Saurimo) of tilesgen running on MSWin32, ID: 59265
[#1   0% Download] Tileset (12,2233,1359) around 51.65,16.30
[#1   0% Download] Downloading: Map data for captionless,tile,maplint...
downloaded 98454 bytes
[#1   0% Download] Checking for UTF-8 errors...
[#1   0% Download] Download in 80 sec
[#1   0% captionless] Running close-areas...
[#1   0% captionless] Transforming zoom level 12 with or/p...
[#1   0% captionless] Beziercurvehinting zoom level 12...
[#1   0% captionless] Rendering...
[#1   0% captionless] Splitting split-z12-1359.png (1 x 1)...
[#1   0% captionless]  -> captionless_12_2233_1359.png...
[#1 100% captionless] Finished 2233,1359 for layer captionless
Job No. 1 100,0 % done.
[#1   0% tile] Transforming zoom level 12 with or/p...Argument
"51,618017" isn't numeric in addition (+) at orp/orp.pl line 314.
Argument "51,672555" isn't numeric in addition (+) at orp/orp.pl line 314.
Argument "16,259766" isn't numeric in subtraction (-) at orp/orp.pl line 316.
Argument "16,347656" isn't numeric in subtraction (-) at orp/orp.pl
line 316.[#1   0% tile] Beziercurvehinting zoom level 12...
Terminating on signal SIGINT(2)

Everything works fine if I set my system locale to English_United States.

I believe this is caused by tilesGen.pl (sub AddBounds) inserting
these lines in map-features-znn.xml:
<!--bounds_mkr1-->
<!-- Inserted by tilesGen -->
<bounds minlat="51,618017" minlon="16,259766" maxlat="51,672555"
maxlon="16,347656" />
<!--bounds_mkr2-->
It seems, indeed, that line 855 in tilesGen.pl: "no locale; # use dot
as separator even for Germans!" does not work as expected.  I wonder
how all other comma-decimal users do, I even thought it might be a
problem with my config, but I don't see which it could be.  Might this
be a problem with comma-decimal locales only under Windows?

I tried replacing the no locale with the explicit setting a
dotted-decimal locale, and everything works as magic:
setlocale(LC_ALL, 'eng_USA');
Unluckily, it seems that Perl under Windows doesn't accept fallback
locales, therefore I cannot put 'en_US' etc. to make it portable to
other OS's, and this is preventing me from using automatic svn
updates.

I hope this can be of some help to you and others.

Ciao,
-- Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tilesathome/attachments/20080915/89ca37c9/attachment.html>


More information about the Tilesathome mailing list