예제 #1
0
def test_ST_SimplifyPreserveTopology():
    data = pandas.Series(
        ["POLYGON ((1 1,1 2,2 2,2 1,1 1))", "POLYGON ((1 1,1 2,2 2,2 1,1 1))"])
    rst = arctern.ST_AsText(
        arctern.ST_SimplifyPreserveTopology(arctern.ST_GeomFromText(data),
                                            10000))
    assert rst[0] == "POLYGON ((1 1,1 2,2 2,2 1,1 1))"
예제 #2
0
def python_test(data):
    TIME_START(func_name)
    arctern.ST_AsText(
        arctern.ST_SimplifyPreserveTopology(arctern.ST_GeomFromText(data),
                                            10000))
    TIME_END(func_name)

    return TIME_INFO()
예제 #3
0
def test_ST_SimplifyPreserveTopology():
    geo = "POLYGON ((0 0,0 1,1 1,1 0,0 0))"
    arr = [geo for x in range(1, 10000001)]
    data = pandas.Series(arr)
    rst = arctern.ST_AsText(
        arctern.ST_SimplifyPreserveTopology(arctern.ST_GeomFromText(data),
                                            10000))
    assert len(rst) == 10000000
예제 #4
0
def ST_SimplifyPreserveTopology(geos, distance_tolerance):
    return arctern.ST_SimplifyPreserveTopology(geos, distance_tolerance[0])
예제 #5
0
def test_ST_SimplifyPreserveTopology():
    data = pandas.Series(
        ["POLYGON ((1 1,1 2,2 2,2 1,1 1))", "POLYGON ((1 1,1 2,2 2,2 1,1 1))"])
    rst = arctern.ST_SimplifyPreserveTopology(data, 10000)
    assert rst[0] == "POLYGON ((1 1,1 2,2 2,2 1,1 1))"