def test_not_projected_buffer():
    featureset = json2ogr(DISSOLVE_GEOJSON)
    assert len(featureset['features']) == 4

    try:
        geom_buffered = buffer_to_dist(featureset, 10)
    except ValueError as e:
        assert str(e) == 'geometries must be projected with the World \
Exemplo n.º 2
0
def test_not_projected_buffer():
    featureset = json2ogr(DISSOLVE_GEOJSON)
    assert len(featureset['features']) == 4

    try:
        geom_buffered = buffer_to_dist(featureset, 10)
    except ValueError as e:
        assert str(e) == ('geometries must be projected with the World ' +
                          'Azimuthal Equidistant coordinate system')
Exemplo n.º 3
0
def test_projected_buffer():
    featureset = json2ogr(DISSOLVE_GEOJSON)
    assert len(featureset['features']) == 4

    geom_projected = project_local(featureset)
    geom_buffered = buffer_to_dist(geom_projected, 10)
    assert isinstance(geom_buffered, dict)
    assert 'features' in geom_buffered.keys()
    assert len(geom_buffered['features']) == 4

    for f_in, f_out in zip(featureset['features'], geom_buffered['features']):
        assert f_out['geometry'].area > f_in['geometry'].area