# HG changeset patch # User Matti Hamalainen # Date 1395011930 -7200 # Node ID d0789eab0c47a8a25edb552e7e48a9741db09171 # Parent 0e6fa3f5684d2bb5f03e9cb18212c02d2d8b9ad5 Rename some functions. diff -r 0e6fa3f5684d -r d0789eab0c47 tools/makegmaps.php --- a/tools/makegmaps.php Sun Mar 16 22:28:23 2014 +0200 +++ b/tools/makegmaps.php Mon Mar 17 01:18:50 2014 +0200 @@ -85,7 +85,10 @@ $mapPalette[3] = array(0,0, 0); -function makeDir($path) +// +// Helper functions +// +function stMakeDir($path) { if (file_exists($path)) return TRUE; @@ -94,7 +97,7 @@ } -function outputToFile($sfilename, $sdata) +function stOutputToFile($sfilename, $sdata) { if (file_put_contents($sfilename, $sdata, LOCK_EX) === FALSE) die("Error writing to '".$sfilename."'.\n"); @@ -231,7 +234,7 @@ } $str .= "];\n"; -outputToFile($worldJS, $str); +stOutputToFile($worldJS, $str); @@ -323,7 +326,7 @@ ); } -outputToJSONFile($tradelaneOut, $qdata); +stOutputToJSONFile($tradelaneOut, $qdata); /* Export tradelane polyline data @@ -352,7 +355,7 @@ } -outputToJSONFile($tradelaneOverlay, $qdata); +stOutputToJSONFile($tradelaneOverlay, $qdata); /* * Generate PNG maps @@ -429,7 +432,7 @@ return TRUE; } -if (!makeDir($pathImageCache)) { +if (!stMakeDir($pathImageCache)) { die("Failed to create cache directory '".$pathImageCache."'!\n"); } @@ -584,7 +587,7 @@ if ($drawn > 0) { - makeDir($pathTileData.$zoom."/".$y, 0755); + stMakeDir($pathTileData.$zoom."/".$y, 0755); imagepng($im, $outFilename); imagedestroy($im); } @@ -609,7 +612,7 @@ $zoom2 = $zoom - 1; $scale = pow(2, $zoom2 - 5); - makeDir($pathTileData.$zoom); + stMakeDir($pathTileData.$zoom); echo "\nzoom level $zoom: ";