add feature
This commit is contained in:
parent
639ae0cd8e
commit
0e534cd490
4
main.py
4
main.py
@ -127,7 +127,7 @@ def generate_river_czml(river_df, runoff_df, level=4, start_time=None):
|
|||||||
|
|
||||||
# 为每条河段创建一个entity
|
# 为每条河段创建一个entity
|
||||||
for idx in river_df.index:
|
for idx in river_df.index:
|
||||||
print(idx)
|
river_index = river_df.loc[idx, "Index"]
|
||||||
coords = mapping(river_df.loc[idx, "geometry"])["coordinates"]
|
coords = mapping(river_df.loc[idx, "geometry"])["coordinates"]
|
||||||
# new_coords = [coord for point in coords for coord in point]
|
# new_coords = [coord for point in coords for coord in point]
|
||||||
# print(new_coords)
|
# print(new_coords)
|
||||||
@ -150,7 +150,7 @@ def generate_river_czml(river_df, runoff_df, level=4, start_time=None):
|
|||||||
|
|
||||||
# 创建河段实体
|
# 创建河段实体
|
||||||
entity = {
|
entity = {
|
||||||
"id": f"river_{idx}",
|
"id": f"{river_index}",
|
||||||
"name": f"River Segment {idx}",
|
"name": f"River Segment {idx}",
|
||||||
"polyline": {
|
"polyline": {
|
||||||
"positions": {
|
"positions": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user