Exemple #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])
Exemple #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])
Exemple #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')
Exemple #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')