-
Hi Is there a way to read the xy-coordinates of a node or gridpoint (all locations water level data is calculated)? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @nfraehr , yes. List below is a function I'm using to get the coordinate of all nodes and create a GeoDataFrame. You will need to get all the node with res1d.data.Nodes. `def get_node_geometry(nodes):
|
Beta Was this translation helpful? Give feedback.
-
Hi,
...or is there a better/more elegant way of obtaining this information already implemented in mikeio1d? |
Beta Was this translation helpful? Give feedback.
Hi @nfraehr , yes. List below is a function I'm using to get the coordinate of all nodes and create a GeoDataFrame. You will need to get all the node with res1d.data.Nodes.
`def get_node_geometry(nodes):
allnodes = [[n.ID, Point(n.XCoordinate, n.YCoordinate)] for n in nodes]
allnode_df = pd.DataFrame(allnodes, columns=['MUID', 'geometry'])
allnode_df.set_index('MUID', inplace = True)