Ejemplo n.º 1
0
 def _points(p):
     ps = [
         p,
         shift(p, (2, 0)),
         shift(p, (1, 1)),
     ]
     return ps
Ejemplo n.º 2
0
 def _polygons(p):
     polys = [
         shapely.geometry.Polygon([[p.x, p.y] for p in [ p, shift(p, (-1,0)), shift(p, (-1,-1)), shift(p, (0,-1)), p]]),
         shapely.geometry.Polygon([[p.x, p.y] for p in [ p, shift(p,  (1,0)), shift(p, (1,-1)), shift(p, (0,-1)), p]]),
         shapely.geometry.Polygon([[p.x, p.y] for p in [ p, shift(p, (-1,1)), shift(p, (0,2)), shift(p, (1,1)), p]]),
     ]
     return polys
Ejemplo n.º 3
0
 def _lines(p):
     ls = [
         shapely.geometry.LineString([p, shift(p,(0,1)), shift(p,(0,2))]),
         shapely.geometry.LineString([p, shift(p,(1,0)), shift(p,(2,0))]),
         shapely.geometry.LineString([p, shift(p,(1,1)), shift(p,(2,2))]),
     ]
     return ls