Example #1
0
def test_ST_Length():
    data = ["LINESTRING(0 0,0 1)", "LINESTRING(1 1,1 4)"]
    data = pandas.Series(data)
    rst = arctern.ST_Length(arctern.ST_GeomFromText(data))

    assert rst[0] == 1.0
    assert rst[1] == 3.0
Example #2
0
def test_ST_Length():
    data = ["LINESTRING(0 0,0 1)", "LINESTRING(1 1,1 4)"]
    array = pyarrow.array(pandas.Series(data))
    rst = arctern.ST_Length(array)

    assert rst[0] == 1.0
    assert rst[1] == 3.0
Example #3
0
def ST_Length(geos):
    return arctern.ST_Length(geos)
def python_test(data):
    TIME_START(func_name)
    arctern.ST_Length(arctern.ST_GeomFromText(data))
    TIME_END(func_name)

    return TIME_INFO()
Example #5
0
def test_ST_Length():
    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_Length(arctern.ST_GeomFromText(data))
    assert len(rst) == 10000000