Skip to main content
Solved

How to find unnecessary network (line)


Forum|alt.badge.img

Dear Sir / Madam,

 

I have an indoor data set. As shown in the figure below.

 

Red line represents network path.

Blue circle is the POI (Point).

Black dot is just the vertex.

 

As I have an indoor data for the entire building. I would like to find network that is unnecessary (not linked with any POI), as shown as Yellow Circle.

 

I am just wondering what transformers I can use to find these path?

I cannot just simply break the lines as some vertex are necessary for turning.

 

I would really need some hand.

 

Thank you very much!

Best answer by geomancer

Look into the ShortestpathFinder. This transformer uses the network (which you already have) and From-To lines connecting every pair of POI.

There are many ways to create those From-To lines. An easy way is to create lines between all POI, and keep only the lines going from a POI_ID to a higher POI_ID.

The segments that you are interested in exit the ShortestpathFinder from the Unused port.

ShortestPathFinder

View original
Did this help you find an answer to your question?

8 replies

geomancer
Evangelist
Forum|alt.badge.img+50
  • Evangelist
  • Best Answer
  • April 25, 2023

Look into the ShortestpathFinder. This transformer uses the network (which you already have) and From-To lines connecting every pair of POI.

There are many ways to create those From-To lines. An easy way is to create lines between all POI, and keep only the lines going from a POI_ID to a higher POI_ID.

The segments that you are interested in exit the ShortestpathFinder from the Unused port.

ShortestPathFinder


david_r
Celebrity
  • April 25, 2023

The NetworkTopologyCalculator might be a starting point.


Forum|alt.badge.img
geomancer wrote:

Look into the ShortestpathFinder. This transformer uses the network (which you already have) and From-To lines connecting every pair of POI.

There are many ways to create those From-To lines. An easy way is to create lines between all POI, and keep only the lines going from a POI_ID to a higher POI_ID.

The segments that you are interested in exit the ShortestpathFinder from the Unused port.

ShortestPathFinder

@geomancer​ Thank you soooooooooooo much for your detailed workspace, it helps a lot!!! As I have no clue where to start.

However, I tried to modify a little bit, since I have to do this on each floor. At the end, the shortestpathfinder transformer couldn't find the path for 2nd floor POI D to E and POI E to F and go to "NoPath". Might I ask what's wrong with my transformer? I have attached my new data and fmw below. I hope you can have some spare time to solve my problem.

 

Also, I have other questions, what is the purpose for TestFilter. (@Value POI_from < @Value POI)?

 

Sorry I have asked so many questions.

 

Again, I am really appreciated your help!


geomancer
Evangelist
Forum|alt.badge.img+50
  • Evangelist
  • April 26, 2023
geomancer wrote:

Look into the ShortestpathFinder. This transformer uses the network (which you already have) and From-To lines connecting every pair of POI.

There are many ways to create those From-To lines. An easy way is to create lines between all POI, and keep only the lines going from a POI_ID to a higher POI_ID.

The segments that you are interested in exit the ShortestpathFinder from the Unused port.

ShortestPathFinder

Hi @zacharylee_1204​ , I am glad I can help you! Your lines on floor 2 are not split at the junctions.

Problematic_LineYou can remedy this with a Chopper in mode 'By Vertex', setting the maximum number of vertices to 2.

 

TestFilter. (@Value POI_from < @Value POI) reduces the number of lines between the POI. The workflow creates line A-B and line B-A, but you only need one of these lines. The workflow also creates 'line' A-A, which is also not needed.


Forum|alt.badge.img
geomancer wrote:

Hi @zacharylee_1204​ , I am glad I can help you! Your lines on floor 2 are not split at the junctions.

Problematic_LineYou can remedy this with a Chopper in mode 'By Vertex', setting the maximum number of vertices to 2.

 

TestFilter. (@Value POI_from < @Value POI) reduces the number of lines between the POI. The workflow creates line A-B and line B-A, but you only need one of these lines. The workflow also creates 'line' A-A, which is also not needed.

It works!!!!!!!!!!! thank you so much @geomancer​ .

 

Actually I have already break the lines by using "Intersector", but I am not sure why it doesn't work.

 

So (@Value POI_from < @Value POI) means it comparing the value? As you said, if it has line A-B and B-A, so B-A is larger than A-B?

I am kind of confused. Sorry about that ^^"

 

Anyhow, I am really appreciated your help. It works! YEAH!!!!!!!!!!!!!!!

 


geomancer
Evangelist
Forum|alt.badge.img+50
  • Evangelist
  • April 26, 2023
geomancer wrote:

Hi @zacharylee_1204​ , I am glad I can help you! Your lines on floor 2 are not split at the junctions. 

Problematic_LineYou can remedy this with a Chopper in mode 'By Vertex', setting the maximum number of vertices to 2.

 

TestFilter. (@Value POI_from < @Value POI) reduces the number of lines between the POI. The workflow creates line A-B and line B-A, but you only need one of these lines. The workflow also creates 'line' A-A, which is also not needed.

Good to know this works 😀 

The TestFilter compares the value of attribute 'POI_From' with the value of attribute 'POI'. Only when the value of 'POI_from' is smaller than the value of 'POI', the feature passes the test.

POI_From | POI |  result
    A    |  A  |  fails
    A    |  B  |  passes    --->
    A    |  C  |  passes    --->
    B    |  A  |  fails
    B    |  B  |  fails
    B    |  C  |  passes    --->
    C    |  A  |  fails
    C    |  B  |  fails
    C    |  C  |  fails

 


Forum|alt.badge.img
geomancer wrote:

Hi @zacharylee_1204​ , I am glad I can help you! Your lines on floor 2 are not split at the junctions.

Problematic_LineYou can remedy this with a Chopper in mode 'By Vertex', setting the maximum number of vertices to 2.

 

TestFilter. (@Value POI_from < @Value POI) reduces the number of lines between the POI. The workflow creates line A-B and line B-A, but you only need one of these lines. The workflow also creates 'line' A-A, which is also not needed.

Got it! Thank you so much! You are awesome! :)


geomancer
Evangelist
Forum|alt.badge.img+50
  • Evangelist
  • May 8, 2023
geomancer wrote:

Hi @zacharylee_1204​ , I am glad I can help you! Your lines on floor 2 are not split at the junctions.

Problematic_LineYou can remedy this with a Chopper in mode 'By Vertex', setting the maximum number of vertices to 2.

 

TestFilter. (@Value POI_from < @Value POI) reduces the number of lines between the POI. The workflow creates line A-B and line B-A, but you only need one of these lines. The workflow also creates 'line' A-A, which is also not needed.

This can also be done using a NeighborFinder in Candidates Only mode, instead of the FeatureMerger (see this post for an example).


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings