def test_ST_PrecisionReduce(): 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_PrecisionReduce(arctern.ST_GeomFromText(data), 3)) assert len(rst) == 10000000
def ST_PrecisionReduce(geos, precision): return arctern.ST_PrecisionReduce(geos, precision[0])
def test_ST_PrecisionReduce(): data = pandas.Series(["POINT (1.333 2.666)", "POINT (2.655 4.447)"]) rst = arctern.ST_AsText( arctern.ST_PrecisionReduce(arctern.ST_GeomFromText(data), 3)) assert rst[0] == "POINT (1.33 2.67)" assert rst[1] == "POINT (2.66 4.45)"
def python_test(data): TIME_START(func_name) arctern.ST_AsText(arctern.ST_PrecisionReduce(arctern.ST_GeomFromText(data), 3)) TIME_END(func_name) return TIME_INFO()
def test_ST_PrecisionReduce(): data = pandas.Series(["POINT (1.333 2.666)", "POINT (2.655 4.447)"]) array = pyarrow.array(data) rst = arctern.ST_PrecisionReduce(array, 3) assert rst[0] == "POINT (1.33 2.67)" assert rst[1] == "POINT (2.66 4.45)"