Cosmetics: nicer use of coords API

We use BoundingBox::as_wkt() to build the surrounding rectangle for
the shade.

Signed-off-by: David Decotigny <d2@maposmatic.org>
stable
David Decotigny 2010-08-07 20:22:02 +02:00
rodzic f8a0c23a42
commit b9850b4ce5
1 zmienionych plików z 2 dodań i 6 usunięć

Wyświetl plik

@ -269,12 +269,8 @@ class OCitySMap:
inside = matches.groups()[0]
bounding_box = bounding_box.create_expanded(0.05, 0.05)
xmax, ymin = bounding_box.get_top_left()
xmin, ymax = bounding_box.get_bottom_right()
poly = "MULTIPOLYGON(((%f %f, %f %f, %f %f, %f %f, %f %f)),((%s)))" % \
(ymin, xmin, ymin, xmax, ymax, xmax, ymax, xmin, ymin, xmin,
inside)
poly = "MULTIPOLYGON(((%s)),((%s)))" % \
(bounding_box.as_wkt(with_polygon_statement = False), inside)
return poly
def get_all_style_configurations(self):