Solved

Find direction of a line using its geometry


Badge +3

Hi,

I'm using the TopologyBuilder to create relationships between water mains (the edges) and the valve furniture (the nodes). Our corporate GIS (Gwater, Oracle based) has an start and end node for each feature to show connectivity, but ARCGIS does not . These values do not exist and I have to create them to align the two GIS systems.

So far the results have been good, as the corporate GIS feature can only connect to two other features. This doesn't happen in ArcGIS for one particular type of feature called a cross valve, which connects 4 mains pipes.

I can find the 4 pipes a cross connects to, but not the direction in which they connect to create the east-west and south-north connectivity. There's nothing in the topologybuilder output which suggests this relationship:

 

fme3 

I was wondering if I can use the spatial location of the pipes that the cross connects to to determine which one is easterly of the cross, westerly and so on:

fme1Any idea how this might be achieved? I can then use these to create my 2 records for the cross to show the e-w and n-2 relationships.

 

The point shown in the map is the cross (IPID 12430772), the main to the west (left) is 12408102, the main to the east (right) is 12383810, the north (top) is 12401081 and the south (bottom) is 12363948.

 

Any help gratefully received!

Thanks

Neil

Cheers

Neil

icon

Best answer by jdh 8 June 2022, 17:17

View original

3 replies

Badge +22

In the topologyBuilder make sure Generate List from Input Edges is enabled. Then the node outputs will contain <_edgeslistname>{}.fme_arc_angle and <_edgeslistname>{}.fme_arc_id. You can use that to determine the pairings. Since the edges in the list are always ordered counterclockwise starting with the positive x-axis (ie East) you don't even need the arc angles if all your valves are 4 way.

 

Note that there is a bit of legacy nomenclature, the fme_arc_id from the node list is actually the _edge_id on the edges (pipes).

Badge +3

In the topologyBuilder make sure Generate List from Input Edges is enabled. Then the node outputs will contain <_edgeslistname>{}.fme_arc_angle and <_edgeslistname>{}.fme_arc_id. You can use that to determine the pairings. Since the edges in the list are always ordered counterclockwise starting with the positive x-axis (ie East) you don't even need the arc angles if all your valves are 4 way.

 

Note that there is a bit of legacy nomenclature, the fme_arc_id from the node list is actually the _edge_id on the edges (pipes).

That's great, thank you - I'll create those attributes and take a look. Thanks for coming back!

Badge +3

In the topologyBuilder make sure Generate List from Input Edges is enabled. Then the node outputs will contain <_edgeslistname>{}.fme_arc_angle and <_edgeslistname>{}.fme_arc_id. You can use that to determine the pairings. Since the edges in the list are always ordered counterclockwise starting with the positive x-axis (ie East) you don't even need the arc angles if all your valves are 4 way.

 

Note that there is a bit of legacy nomenclature, the fme_arc_id from the node list is actually the _edge_id on the edges (pipes).

Thanks jdh - all I needed to do was explode out the attributes and then use the _element_index in the widdershins direction to create my connectivity. Cheers!

Reply