コード例 #1
0
ファイル: test_main.py プロジェクト: johnpdees/pygeoif
 def setUp(self):
     self.a = geometry.Polygon(
         ((0., 0.), (0., 1.), (1., 1.), (1., 0.), (0., 0.)))
     self.b = geometry.Polygon(
         ((0., 0.), (0., 2.), (2., 1.), (2., 0.), (0., 0.)))
     self.f1 = geometry.Feature(self.a)
     self.f2 = geometry.Feature(self.b)
     self.fc = geometry.FeatureCollection([self.f1, self.f2])
コード例 #2
0
ファイル: test_main.py プロジェクト: mhaberler/pygeoif
 def setUp(self):
     self.geometry = geometry._Geometry()
     self.point = geometry.Point(0, 1)
     self.linestring = geometry.LineString([[0, 0], [1, 0], [1, 1]])
     self.linearring = geometry.LinearRing([[0, 0], [1, 0], [1, 1], [0, 0]])
     self.coords_1 = ((0., 0.), (0., 1.), (1., 1.), (1., 0.), (0., 0.))
     self.polygon = geometry.Polygon(self.coords_1)
     self.multipoint = geometry.MultiPoint([[0.0, 0.0], [1.0, 2.0]])
     self.multiline = geometry.MultiLineString([[[0.0, 0.0], [1.0, 2.0]]])
     self.multipoly = geometry.MultiPolygon([
         (((0.0, 0.0), (0.0, 1.0), (1.0, 1.0), (1.0, 0.0)),
          [((0.1, 0.1), (0.1, 0.2), (0.2, 0.2), (0.2, 0.1))])
     ])
     self.geo_collect = geometry.GeometryCollection(
         [self.point, self.linestring, self.linearring])
     self.feature = geometry.Feature(self.point, {'a': 1, 'b': 2})
     self.feature_list = [self.feature, self.feature]
     self.fc = geometry.FeatureCollection(self.feature_list)