diff --git a/tests/data/good_maps/point_json.xml b/tests/data/good_maps/point_json.xml index 1e9146dc4..aa2efd141 100644 --- a/tests/data/good_maps/point_json.xml +++ b/tests/data/good_maps/point_json.xml @@ -22,7 +22,7 @@ 1 - ../json/points.json + ../json/points.geojson 0 ogr diff --git a/tests/data/good_maps/shield_symbolizer.xml b/tests/data/good_maps/shield_symbolizer.xml index 51882658e..716875c24 100644 --- a/tests/data/good_maps/shield_symbolizer.xml +++ b/tests/data/good_maps/shield_symbolizer.xml @@ -20,7 +20,7 @@ 2 - ../json/lines.json + ../json/lines.geojson 0 ogr @@ -29,7 +29,7 @@ 1 - ../json/points.json + ../json/points.geojson 0 ogr diff --git a/tests/data/json/escaped.json b/tests/data/json/escaped.geojson similarity index 100% rename from tests/data/json/escaped.json rename to tests/data/json/escaped.geojson diff --git a/tests/data/json/lines.json b/tests/data/json/lines.geojson similarity index 100% rename from tests/data/json/lines.json rename to tests/data/json/lines.geojson diff --git a/tests/data/json/null_feature.json b/tests/data/json/null_feature.geojson similarity index 100% rename from tests/data/json/null_feature.json rename to tests/data/json/null_feature.geojson diff --git a/tests/data/json/points.json b/tests/data/json/points.geojson similarity index 100% rename from tests/data/json/points.json rename to tests/data/json/points.geojson diff --git a/tests/python_tests/datasource_test.py b/tests/python_tests/datasource_test.py index 0aba5a92a..22436713e 100644 --- a/tests/python_tests/datasource_test.py +++ b/tests/python_tests/datasource_test.py @@ -33,7 +33,7 @@ def test_total_feature_count_shp(): def test_total_feature_count_json(): if 'ogr' in mapnik.DatasourceCache.plugin_names(): - ds = mapnik.Ogr(file='../data/json/points.json',layer_by_index=0) + ds = mapnik.Ogr(file='../data/json/points.geojson',layer_by_index=0) desc = ds.describe() eq_(desc['geometry_type'],mapnik.DataGeometryType.Point) eq_(desc['name'],'ogr') @@ -56,7 +56,7 @@ def test_sqlite_reading(): eq_(num_feats, 245) def test_reading_json_from_string(): - json = open('../data/json/points.json','r').read() + json = open('../data/json/points.geojson','r').read() if 'ogr' in mapnik.DatasourceCache.plugin_names(): ds = mapnik.Ogr(file=json,layer_by_index=0) features = ds.all_features() diff --git a/tests/python_tests/geojson_plugin_test.py b/tests/python_tests/geojson_plugin_test.py index 268ce9a5c..d6143b7b7 100644 --- a/tests/python_tests/geojson_plugin_test.py +++ b/tests/python_tests/geojson_plugin_test.py @@ -13,7 +13,7 @@ def setup(): if 'geojson' in mapnik.DatasourceCache.plugin_names(): def test_geojson_init(): - ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.json') + ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.geojson') e = ds.envelope() assert_almost_equal(e.minx, -81.705583, places=7) assert_almost_equal(e.miny, 41.480573, places=6) @@ -21,7 +21,7 @@ if 'geojson' in mapnik.DatasourceCache.plugin_names(): assert_almost_equal(e.maxy, 41.480573, places=3) def test_geojson_properties(): - ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.json') + ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.geojson') f = ds.features_at_point(s.envelope().center()).features[0] desc = ds.describe() @@ -36,7 +36,7 @@ if 'geojson' in mapnik.DatasourceCache.plugin_names(): eq_(f['NOM_FR'], u'Québec') def test_geojson_properties(): - ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.json') + ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.geojson') f = ds.all_features()[0] desc = ds.describe() @@ -53,7 +53,7 @@ if 'geojson' in mapnik.DatasourceCache.plugin_names(): # @raises(RuntimeError) def test_that_nonexistant_query_field_throws(**kwargs): - ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.json') + ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.geojson') eq_(len(ds.fields()),7) # TODO - this sorting is messed up #eq_(ds.fields(),['name', 'int', 'double', 'description', 'boolean', 'NOM_FR']) diff --git a/tests/python_tests/ogr_test.py b/tests/python_tests/ogr_test.py index b74289987..4b29d5570 100644 --- a/tests/python_tests/ogr_test.py +++ b/tests/python_tests/ogr_test.py @@ -56,7 +56,7 @@ if 'ogr' in mapnik.DatasourceCache.plugin_names(): # disabled because OGR prints an annoying error: ERROR 1: Invalid Point object. Missing 'coordinates' member. #def test_handling_of_null_features(): - # ds = mapnik.Ogr(file='../data/json/null_feature.json',layer_by_index=0) + # ds = mapnik.Ogr(file='../data/json/null_feature.geojson',layer_by_index=0) # fs = ds.all_features() # eq_(len(fs),1)