Ejemplo n.º 1
0
 def test_bbox(self):
     content = self.read_file('collection.json')
     geojson = GeoJSON()
     features = geojson.decode(content)
     data = GeoJSON.encode(geojson, features, to_string=False, bbox=True)
     self.assertEqual(data['bbox'], [100.0, 0.0, 105.0, 1.0])
Ejemplo n.º 2
0
 def test_bbox(self):
     content = self.read_file('collection.json')
     geojson = GeoJSON()
     features = geojson.decode(content)
     data = GeoJSON.encode(geojson, features, to_string=False, bbox=True)
     self.assertEqual(data['bbox'], [100.0, 0.0, 105.0, 1.0])
Ejemplo n.º 3
0
 def test_encode(self):
     content = self.read_file('collection.json')
     geojson = GeoJSON()
     features = geojson.decode(content)
     data = GeoJSON.encode(geojson, features, to_string=False, bbox=True)
     self.assertEqual(data['type'], 'FeatureCollection')
Ejemplo n.º 4
0
 def test_encode(self):
     content = self.read_file('collection.json')
     geojson = GeoJSON()
     features = geojson.decode(content)
     data = GeoJSON.encode(geojson, features, to_string=False, bbox=True)
     self.assertEqual(data['type'], 'FeatureCollection')