示例#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))"