コード例 #1
0
 def setUpTestData(cls):
     cls.geoj = {
         'type': 'MultiPoint',
         'coordinates': ((0.0, 0.0), (1.0, 1.0))
     }
     cls.bbox = (0.0, 0.0, 1.0, 1.0)
     cls.geom_type = cls.geoj['type']
     cls.geom = WKBGeometry(cls.geoj)
コード例 #2
0
 def setUpTestData(cls):
     cls.geoj = {
         'type': 'LineString',
         'coordinates': ((0.0, 0.0), (1.0, 1.0), (2.0, 2.0))
     }
     cls.bbox = (0.0, 0.0, 2.0, 2.0)
     cls.geom_type = cls.geoj['type']
     cls.geom = WKBGeometry(cls.geoj)
コード例 #3
0
 def setUpTestData(cls):
     cls.geoj = {
         'type':
         'MultiPolygon',
         'coordinates':
         [(((0.0, 0.0), (0.0, 2.0), (2.0, 2.0), (2.0, 0.0), (0.0, 0.0)), ),
          (((10.25, 10.25), (10.75, 10.25), (10.75, 10.75), (10.25, 10.75),
            (10.25, 10.25)), )]
     }
     cls.bbox = (0.0, 0.0, 10.75, 10.75)
     cls.geom_type = cls.geoj['type']
     cls.geom = WKBGeometry(cls.geoj)
コード例 #4
0
 def setUpTestData(cls):
     cls.geoj = {
         'type':
         'MultiLineString',
         'coordinates':
         (((0.0, 0.0), (0.0, 2.0), (2.0, 2.0), (2.0, 0.0), (0.0, 0.0)),
          ((0.25, 0.25), (0.75, 0.25), (0.75, 0.75), (0.25, 0.75), (0.25,
                                                                    0.25)))
     }
     cls.bbox = (0.0, 0.0, 2.0, 2.0)
     cls.geom_type = cls.geoj['type']
     cls.geom = WKBGeometry(cls.geoj)
コード例 #5
0
 def setUpTestData(cls):
     json_string = json.dumps({'type': 'Point', 'coordinates': [0, 0]})
     cls.input = json_string
     geom = WKBGeometry(json_string)
     cls.address = Address.objects.create(geom=geom)
コード例 #6
0
 def setUpTestData(cls):
     geoj = {'type': 'Point', 'coordinates': [0, 0]}
     cls.input = geoj
     geom = WKBGeometry(geoj)
     cls.address = Address.objects.create(geom=geom)
コード例 #7
0
 def setUpTestData(cls):
     wkb = WKBGeometry({'type': 'Point', 'coordinates': [0, 0]}).wkb
     cls.input = wkb
     geom = WKBGeometry(wkb)
     cls.address = Address.objects.create(geom=geom)