Пример #1
0
def test_convert_with_srs(tmp_dir):
    convert(os.path.join(fixtures_dir, 'with_srs.las'),
            outfolder=tmp_dir,
            srs_out='4978',
            jobs=1)
    assert os.path.exists(os.path.join(tmp_dir, 'tileset.json'))
    assert os.path.exists(os.path.join(tmp_dir, 'r.pnts'))
Пример #2
0
def test_convert(tmp_dir):
    # just
    convert(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                         './ripple.las'),
            outfolder=tmp_dir)
    assert os.path.exists(os.path.join(tmp_dir, 'tileset.json'))
    assert os.path.exists(os.path.join(tmp_dir, 'r0.pnts'))
Пример #3
0
def test_convert():
    # just
    convert(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                         './ripple.las'),
            outfolder='./tmp')
    assert os.path.exists(os.path.join('tmp', 'tileset.json'))
    assert os.path.exists(os.path.join('tmp', 'r0.pnts'))
    shutil.rmtree('./tmp')
Пример #4
0
def test_convert_simple_xyz(tmp_dir):
    convert(os.path.join(fixtures_dir, 'simple.xyz'),
            outfolder=tmp_dir,
            srs_in='3857',
            srs_out='4978',
            jobs=1)
    assert os.path.exists(os.path.join(tmp_dir, 'tileset.json'))
    assert os.path.exists(os.path.join(tmp_dir, 'r.pnts'))
Пример #5
0
def test_convert_without_srs(tmp_dir):
    with raises(SrsInMissingException):
        convert(os.path.join(fixtures_dir, 'without_srs.las'),
                outfolder=tmp_dir,
                srs_out='4978')
    assert not os.path.exists(os.path.join(tmp_dir))

    convert(os.path.join(fixtures_dir, 'without_srs.las'),
            outfolder=tmp_dir,
            srs_in='3949',
            srs_out='4978')
    assert os.path.exists(os.path.join(tmp_dir, 'tileset.json'))
    assert os.path.exists(os.path.join(tmp_dir, 'r.pnts'))
Пример #6
0
def test_convert_without_srs():
    with raises(SrsInMissingException):
        convert(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                             'fixtures', 'without_srs.las'),
                outfolder='./tmp',
                srs_out='4978')
    assert not os.path.exists(os.path.join('tmp'))

    convert(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                         'fixtures', 'without_srs.las'),
            outfolder='./tmp',
            srs_in='3949',
            srs_out='4978')
    assert os.path.exists(os.path.join('tmp', 'tileset.json'))
    assert os.path.exists(os.path.join('tmp', 'r.pnts'))
    shutil.rmtree('./tmp')