mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
bdd: allow to set an origin of the grid
This commit is contained in:
@@ -109,13 +109,13 @@ class GeometryFactory:
|
||||
|
||||
return scene
|
||||
|
||||
def set_grid(self, lines, grid_step):
|
||||
def set_grid(self, lines, grid_step, origin=(0.0, 0.0)):
|
||||
""" Replace the grid with one from the given lines.
|
||||
"""
|
||||
self.grid = {}
|
||||
y = 0
|
||||
y = origin[1]
|
||||
for line in lines:
|
||||
x = 0
|
||||
x = origin[0]
|
||||
for pt_id in line:
|
||||
if pt_id.isdigit():
|
||||
self.grid[int(pt_id)] = (x, y)
|
||||
|
||||
Reference in New Issue
Block a user