def test_ST_Area(): data = ["POLYGON((0 0,1 0,1 1,0 1,0 0))", "POLYGON((0 0,0 8,8 8,8 0,0 0))"] data = pandas.Series(data) rst = arctern.ST_Area(arctern.ST_GeomFromText(data)) assert rst[0] == 1.0 assert rst[1] == 64.0
def test_ST_Area(): data = ["POLYGON((0 0,1 0,1 1,0 1,0 0))", "POLYGON((0 0,0 8,8 8,8 0,0 0))"] array = pyarrow.array(pandas.Series(data)) rst = arctern.ST_Area(array) assert rst[0] == 1.0 assert rst[1] == 64.0
def ST_Area(geos): return arctern.ST_Area(geos)
def python_test(data): TIME_START(func_name) arctern.ST_Area(arctern.ST_GeomFromText(data)) TIME_END(func_name) return TIME_INFO()
def test_ST_Area(): 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_Area(arctern.ST_GeomFromText(data)) assert len(rst) == 10000000