def test_point_map(): x_data = [] y_data = [] # y = 150 for i in range(100, 200): x_data.append(i) y_data.append(150) # y = x - 50 for i in range(100, 200): x_data.append(i) y_data.append(i - 50) # y = 50 for i in range(100, 200): x_data.append(i) y_data.append(50) arr_x = pandas.Series(x_data) arr_y = pandas.Series(y_data) vega_circle2d = vega_pointmap( 1024, 896, [-73.998427, 40.730309, -73.954348, 40.780816], 3, "#2DEF4A", 0.5, "EPSG:43") vega_json = vega_circle2d.build() curve_z1 = arctern.point_map(arr_x, arr_y, vega_json.encode('utf-8')) save_png(curve_z1, "/tmp/test_curve_z1.png")
def test_point_map(): x_data = [] y_data = [] # y = 150 for i in range(100, 200): x_data.append(i) y_data.append(150) # y = x - 50 for i in range(100, 200): x_data.append(i) y_data.append(i - 50) # y = 50 for i in range(100, 200): x_data.append(i) y_data.append(50) arr_x = pandas.Series(x_data) arr_y = pandas.Series(y_data) points = arctern.ST_Point(arr_x, arr_y) vega = vega_pointmap( 1024, 896, bounding_box=[-73.998427, 40.730309, -73.954348, 40.780816], point_size=3, point_color="#2DEF4A", opacity=0.5, coordinate_system="EPSG:4326") curve_z1 = arctern.point_map(vega, points) save_png(curve_z1, "/tmp/test_curve_z1.png")
def test_point_map(): x_data = [] y_data = [] # y = 150 for i in range(100, 200): x_data.append(i) y_data.append(150) # y = x - 50 for i in range(100, 200): x_data.append(i) y_data.append(i - 50) # y = 50 for i in range(100, 200): x_data.append(i) y_data.append(50) arr_x = pandas.Series(x_data) arr_y = pandas.Series(y_data) vega_circle2d = VegaCircle2d(300, 200, 30, "#ff0000", 0.5) vega_json = vega_circle2d.build() curve_z = arctern.point_map(arr_x, arr_y, vega_json.encode('utf-8')) save_png(curve_z, "/tmp/curve_z.png")
def test_point_map(): x_data = [] y_data = [] # y = 150 for i in range(100, 200): x_data.append(i) y_data.append(150) # y = x - 50 for i in range(100, 200): x_data.append(i) y_data.append(i - 50) # y = 50 for i in range(100, 200): x_data.append(i) y_data.append(50) arr_x = pandas.Series(x_data) arr_y = pandas.Series(y_data) points = arctern.ST_Point(arr_x, arr_y) vega = vega_pointmap(1024, 896, [-73.998427, 40.730309, -73.954348, 40.780816], 3, "#2DEF4A", 0.5, "EPSG:4326") curve_z1 = arctern.point_map(vega, points) save_png(curve_z1, "/tmp/test_curve_z1.png")
def test_point_map(): x_data = [] y_data = [] # y = 150 for i in range(100, 200): x_data.append(i) y_data.append(150) # y = x - 50 for i in range(100, 200): x_data.append(i) y_data.append(i - 50) # y = 50 for i in range(100, 200): x_data.append(i) y_data.append(50) arr_x = pyarrow.array(x_data, type='uint32') arr_y = pyarrow.array(y_data, type='uint32') vega_circle2d = VegaCircle2d(300, 200, 30, "#ff0000", 0.5) vega_json = vega_circle2d.build() curve_z = arctern.point_map(arr_x, arr_y, vega_json.encode('utf-8')) curve_z = curve_z.buffers()[1].to_pybytes() _savePNG(curve_z, "/tmp/curve_z.png")
def pointmap_wkb(point, conf=vega): from arctern import point_map return point_map(conf, point)