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