[Thuban-commits] r2863 - trunk/thuban/Extensions/gMapTiles
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sat Aug 9 01:38:25 CEST 2008
Author: elachuni
Date: 2008-08-09 01:38:24 +0200 (Sat, 09 Aug 2008)
New Revision: 2863
Modified:
trunk/thuban/Extensions/gMapTiles/exporter.py
Log:
Fixed a bug in gMap tile exporting.
Modified: trunk/thuban/Extensions/gMapTiles/exporter.py
===================================================================
--- trunk/thuban/Extensions/gMapTiles/exporter.py 2008-07-30 05:55:28 UTC (rev 2862)
+++ trunk/thuban/Extensions/gMapTiles/exporter.py 2008-08-08 23:38:24 UTC (rev 2863)
@@ -1,7 +1,7 @@
import os
import math
import mapscript
-from Extensions.umn_mapserver.mf_export import thuban_to_map
+from Extensions.umn_mapserver.mf_export import thuban_to_map, add_circle_symbol
from Extensions.umn_mapserver.mapfile import MF_Map
from Thuban.Model.proj import Projection
try:
@@ -75,7 +75,7 @@
img = Image(str(folder+"/%d/model.png" % (zoom,)))
while x < width:
y = 0
- j = yTile+1
+ j = yTile
while y < height:
if pythonMagick:
img2 = Image(img)
@@ -98,6 +98,7 @@
if filename is None:
mf = MF_Map(mapscript.mapObj(""))
mf.set_size (60, 50) # Set some size for thuban_to_map not to fail
+ add_circle_symbol (mf)
thuban_to_map (context, mf)
else:
mf = MF_Map(mapscript.mapObj(filename))
@@ -131,8 +132,8 @@
gMercator = ["proj=merc", "a=%f"%coord.radius, "b=%f"%coord.radius]
mf.set_projection (Projection(gMercator))
mminx = ((int(coord.longToX(minx))) // 256) * 256 # Projected (pixels)
- mmaxx = ((int(coord.longToX(maxx))) // 256) * 256
- mmaxy = ((int(coord.latToY(maxy)) + 255)// 256) * 256 - 1
+ mmaxx = ((int(coord.longToX(maxx)) + 255)// 256) * 256 - 1
+ mmaxy = ((int(coord.latToY(maxy))) // 256) * 256
mminy = ((int(coord.latToY(miny)) + 255)// 256) * 256 - 1
width = mmaxx - mminx
height = mminy - mmaxy
More information about the Thuban-commits
mailing list