# renormalise into unit space [0,1]
point.x = 0.5 + point.x / SIZE
point.y = 0.5 - point.y / SIZE
# renormalise into unit space [0,1]
point.x = 0.5 + point.x / SIZE
point.y = 0.5 - point.y / SIZE
# first convert to spherical mercator
point = PROJ.forward(latlon)
tile_from_merc(point, zoom)
end
# this must match the definition of xyz_to_meta in mod_tile
# first convert to spherical mercator
point = PROJ.forward(latlon)
tile_from_merc(point, zoom)
end
# this must match the definition of xyz_to_meta in mod_tile
EXPIRY_TIME = Time.parse("2000-01-01 00:00:00")
# expire the meta tile by setting the modified time back
EXPIRY_TIME = Time.parse("2000-01-01 00:00:00")
# expire the meta tile by setting the modified time back
- def Expire.expire(change_file, min_zoom, max_zoom, tile_dirs)
+ def self.expire(change_file, min_zoom, max_zoom, tile_dirs)
- def Expire.do_expire(change_file, min_zoom, max_zoom, &_)
+ def self.do_expire(change_file, min_zoom, max_zoom, &_)
# read in the osm change file
doc = XML::Document.file(change_file)
# hash map to contain all the nodes
# read in the osm change file
doc = XML::Document.file(change_file)
# hash map to contain all the nodes
# we put all the nodes into the hash, as it doesn't matter whether the node was
# added, deleted or modified - the tile will need updating anyway.
# we put all the nodes into the hash, as it doesn't matter whether the node was
# added, deleted or modified - the tile will need updating anyway.