Create a Geometric Network and Set Flow Direction

简介: 几何网络是有向网络,是用来模拟现实中的如排水管,天然气管,电力等的网络。可是这个有向到底体现在哪里,原来以为以为集几何网络的方向是数字化的方向,但是我错了。我一般用几何网络做路径分析,我们知道,如果不强加限制,从A点到B点,那么,逆着原路走,也可以从B到A,这似乎体现不到方向,但是追中分析中,这种是很明显的。

几何网络是有向网络,是用来模拟现实中的如排水管,天然气管,电力等的网络。可是这个有向到底体现在哪里,原来以为以为集几何网络的方向是数字化的方向,但是我错了。我一般用几何网络做路径分析,我们知道,如果不强加限制,从A点到B点,那么,逆着原路走,也可以从BA,这似乎体现不到方向,但是追中分析中,这种是很明显的。我们现在从几何网络的特点说起:

网络要素只存在于几何网络中

三种类型:

简单节点(Simple junction

简单边  Simple edge

复杂边  Complex edge

独立节点类

维护网络的完整性

网络边的端点必须和网络节点连接

系统维护

网络连通性的物理表现 – 索引

高性能图形引擎

快速的网络搜索

紧凑高效

连通关系、权重(属性)存储在BLOB

各种网络分析功能基于逻辑网络进行

简单边

要素(feature)与图形元素(element)一一对应

在简单边中间插入简单节点,简单边将被打断

复杂边

要素(feature)与图形元素(element)一对多

复杂边的中间增加网络节点不会打断边

会在复杂边的几何图形中增加一个节点

会产生新的逻辑要素 – 如:边元素(edge element

可以使用“分割”工具打断线

在创建几何网络的时候 指定了包含源和汇的要素类,那么在这些里面会多出一个字段 ancillary role,这个有三个阈值 NnoneSinkSource

 

而几何网络中的方向是由连通性,源和汇,可用性决定的,所以在建立几何网络后,我们就要做这些设置,下面的是我设置好的一个,这个比较简单,只是为了说明问题,在设置这些之后,我们可以看到流向。


Create a Geometric Network and Set Flow Direction
Start with a stream layer that is completely connected with no breaks. There cannot be any braided stream channels either. This layer can be in shapefile or Geodatabase format.
Next you need to export all of the nodes from the stream layer into a point shapefile. However, you only want to export nodes for stream junctions and dangles (end points). You don’t want pseudo nodes (arc mid-points). The best way to get the nodes is using ET Geowizards. ET Geowizards > Polyline > Export Nodes > Dangling and Regular.
1) Use ArcCatalog to create a File Personal Geodatabase. ArcCatalog > Right click > New > File Geodatabase. Create a Feature Dataset inside the Geodatabase. Inside Geodatabase > Right click > New > Feature Dataset.
2) Import your stream layer into the Feature Dataset. ArcCatalog > Inside Feature Dataset > Right Click > Import > Feature Class Single. Also import your node point layer into the Feature Dataset. ArcCatalog > Inside Feature Dataset > Right Click > Import > Feature Class Single.
3) Next create the Geometric Network. Right click the right pane in ArcCatalog inside the Feature Dataset. Select New > Geometric Network.
When running through the dialog, select both the lines and points to participate in the network. Tell the wizard that you want to set sources and sinks. Finish the wizard.
4) Add the geometric network to ArcMap. Be sure the original point layer and line layers are displayed.
5) Next edit the point layer to set the sink. Editor > Start Editing. Make the point layer the editable layer. Select the point that is the pour point for your network using the editor select tool. This would be the very end point where all water would flow out of the network.
6) Open the attribute table and look at the selected record. There should be a field called AncillaryRole. Left click the value in this field and set it to Sink. All of the other records should have a value of None. Save edits and stop editing. (Note that the very end point may not work. You may have to select the next one upstream in the network.)
7) Display the stream lines, junctions, and points in ArcMap. Add the Utility Network Analyst toolbar to ArcMap.
8) Editor > Start Editing – I don’t know which layer should be the active one for editing, so do all three layers. Select each layer in the Editor dropdown and then hit the Set Flow Direction icon on the Network toolbar. That should set the flow. Save edits and stop editing.
Flipping Arcs
Scenario 1 – No geometric network with a few arcs to flip.
If you have not set up a geometric network and want to see the direction that your arcs are digitized, you can symbolize your arcs using the arrow symbol that is in the standard symbol set called “Arrow at End”.
If you need to flip just a few arcs, you can begin an edit session. Then double click the arc so that it becomes a sketch and you can view the vertices as green squares. Then right click a green square and click Flip. The arc direction gets flipped.
Scenario 2 – No geometric network with lots of arcs to flip.
If you have lots of arcs to flip you need to find a good way to determine which ones need to be flipped. You can use a DEM along with your stream line data to do this. Go to the ESRI Support page > Downloads > ArcScripts. Search “Flip Lines”. You should see a Python script called “Calculate polyline endpoint elevations – ensure streams flow downhill”.
http://arcscripts.esri.com/details.asp?dbid=15527
Download and run this script. The script will not flip the arcs, but can help you determine which ones to flip using the from node and to node elevations.
To actually flip the arcs, download and run this script:
http://arcscripts.esri.com/details.asp?dbid=13023. This is called “Flip Lines” and it’s the version written by Michele Lundeen.
Scenario 3 – Geometric network is created with lots of arcs to flip.
If your network is already set up, you can use a VBA program to flip all arcs so that their digitized direction points downstream. The program is on the ESRI web site here:
http://arcscripts.esri.com/details.asp?dbid=13023. This is called “Flip Lines” and it’s the version written by Michele Lundeen.

相关文章
|
容器
Unable to create tempDir. java.io.tmpdir is set to /tmp
Unable to create tempDir. java.io.tmpdir is set to /tmp
714 1
|
Linux iOS开发 MacOS
pnpm全局安装报错:Run “pnpm setup“ to create it automatically, or set the global-bin-dir setting, or the PN
pnpm全局安装报错:Run “pnpm setup“ to create it automatically, or set the global-bin-dir setting, or the PN
4426 0
|
JSON Java 关系型数据库
Java更新数据库报错:Data truncation: Cannot create a JSON value from a string with CHARACTER SET 'binary'.
在Java中,使用mybatis-plus更新实体类对象到mysql,其中一个字段对应数据库中json数据类型,更新时报错:Data truncation: Cannot create a JSON value from a string with CHARACTER SET 'binary'.
1519 4
Java更新数据库报错:Data truncation: Cannot create a JSON value from a string with CHARACTER SET 'binary'.
Unable to create tempDir. java.io.tmpdir is set to /tmp
Unable to create tempDir. java.io.tmpdir is set to /tmp
225 0
|
5月前
|
存储 JavaScript Java
(Python基础)新时代语言!一起学习Python吧!(四):dict字典和set类型;切片类型、列表生成式;map和reduce迭代器;filter过滤函数、sorted排序函数;lambda函数
dict字典 Python内置了字典:dict的支持,dict全称dictionary,在其他语言中也称为map,使用键-值(key-value)存储,具有极快的查找速度。 我们可以通过声明JS对象一样的方式声明dict
346 1
|
8月前
|
存储 缓存 JavaScript
Set和Map有什么区别?
Set和Map有什么区别?
570 1
|
5月前
|
存储 算法 容器
set_map的实现+set/map加持秒杀高频算法题锻炼算法思维
`set`基于红黑树实现,支持有序存储、自动去重,增删查效率为O(logN)。通过仿函数可自定义排序规则,配合空间配置器灵活管理内存。不支持修改元素值,迭代器失效需注意。`multiset`允许重复元素。常用于去重、排序及查找场景。
|
9月前
|
存储 JavaScript 前端开发
for...of循环在遍历Set和Map时的注意事项有哪些?
for...of循环在遍历Set和Map时的注意事项有哪些?
417 121
|
12月前
|
编译器 C++ 容器
【c++丨STL】基于红黑树模拟实现set和map(附源码)
本文基于红黑树的实现,模拟了STL中的`set`和`map`容器。通过封装同一棵红黑树并进行适配修改,实现了两种容器的功能。主要步骤包括:1) 修改红黑树节点结构以支持不同数据类型;2) 使用仿函数适配键值比较逻辑;3) 实现双向迭代器支持遍历操作;4) 封装`insert`、`find`等接口,并为`map`实现`operator[]`。最终,通过测试代码验证了功能的正确性。此实现减少了代码冗余,展示了模板与仿函数的强大灵活性。
325 2