def test_ST_MakeValid(): 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_MakeValid( arctern.ST_GeomFromText(data))) assert len(rst) == 10000000
def python_test(data): TIME_START(func_name) arctern.ST_AsText(arctern.ST_MakeValid(arctern.ST_GeomFromText(data))) TIME_END(func_name) return TIME_INFO()
def ST_MakeValid(geos): return arctern.ST_MakeValid(geos)
def test_ST_MakeValid(): data = pandas.Series(["POLYGON ((2 1,3 1,3 2,2 2,2 8,2 1))"]) rst = arctern.ST_AsText(arctern.ST_MakeValid( arctern.ST_GeomFromText(data))) assert rst[ 0] == "GEOMETRYCOLLECTION (POLYGON ((2 2,3 2,3 1,2 1,2 2)),LINESTRING (2 2,2 8))"
def test_ST_MakeValid(): data = pandas.Series(["POLYGON ((2 1,3 1,3 2,2 2,2 8,2 1))"]) array = pyarrow.array(data) rst = arctern.ST_MakeValid(array) assert rst[ 0] == "GEOMETRYCOLLECTION (POLYGON ((2 2,3 2,3 1,2 1,2 2)),LINESTRING (2 2,2 8))"