Question

Create nodes where lines intersect polygons

  • 21 November 2016
  • 9 replies
  • 91 views

Hello, I am struggling to create nodes where lines intersect polygons. Basically, I have some points on a network and I need to create new points on the network that are 1 m away from that point. I thought I could buffer the original points by 1 m and then find where it intersects with the line (and then address the cases where it might intersect with other nearby line etc. later). However in the end results I got several additional points from the vertexes of the lines. How should I eliminate them? At the moment I use Bufferer -> GeometryCoercer to create line features, then do LineonLineOverlayer to intersect the network line and the buffer line.


9 replies

Userlevel 2
Badge +16

The Intersector transformer should be able to do just this (use the Nodes output port).

To filter out intersecting lines and polygons (not line on polygon) use a Tester to see if line attributes and polygon attributes (e.g. LineID and PolygonID) have a value.

Thank you @erik_jan. Could you explain a bit more please? I tried the Intersector transformer but the nodes I've got still contain the nodes that I don't need, and I only got _node_number, _overlaps, _segments as attributes so can't filter them out based on ID. I only want the points where the circle intersects the lines so would really appreciate if you could point out a way.

Sorry I thought I had pasted the image but it appeared that I have not.
Badge +16

Hi @hoangngoclan you could also try the LineOnAreaOverlayer as an alternative.

Hope this helps

Userlevel 2
Badge +16

Seeing this image it might even be easier:

Use the LineOnAreaOverlayer and the Lines output. This will result in the line segments inside the cricles.

Then use the CoordinateExtractor (index 0 for start and index -1 for end point).

If you need the points, use two VertexCreator tranformers for Start and End points.

Badge +16

Yet another option is the TopologyBulider, see attached workspace.

create-nodes-where-lines-intersect-polygons.fmw

Userlevel 4
Badge +25

Yes, I think the Intersector is giving you the end points of the lines as nodes, as well as the intersection points. For me, I used a GeometryCoercer to coerce the circle into a line, then a LineOnLineOverlayer. The Point output port on that contains the point features you are looking for.

Badge +3

Get the id's of the lines that meet at the point.

Then use a snipper to snip 1 meter of each line at both ends

Test wich snipped parts touch the node. (use PointonLine overlayer) Then snipp the endpoints.

( settings vertex, -1,-1 and vertex 0,0).

Test wich end points touch the node and discard those. (use PointonPoint overlayer)

The overlayers have tolerancesettings wich you'll need.

Badge

hi,

Can anyone explain how to measure the distance of intersected lines

 

Reply