Solved

Extracting points from line (SHP)


Badge

Hello, I have a .SHP with lines and I need to extract X, Y coordinates as points for start and end nodes of lines and give them an ID. I could have a polyline containing several lines connected, in that case end node of first line is the same point as start point of next line. I tried with CoordinateExtractor, CoordinateConcentenator, AttributeKeeper but had no luck. Is there any solution for my problem?

icon

Best answer by takashi 7 May 2018, 13:07

View original

4 replies

Userlevel 2
Badge +16
If a polyline has four vertices p0, p1, p2 and p3, which one is your desired result - {p0, p1, p1, p2, p2, p3} or {p0, p1, p2, p3}?

 

 

Badge
If a polyline has four vertices p0, p1, p2 and p3, which one is your desired result - {p0, p1, p1, p2, p2, p3} or {p0, p1, p2, p3}?

 

 

@takashi, it doesn't matter. I need to write this points to Oracle DB. First result would be easier, I think, where I would just write to DB, and second i would need to use SpatialRelator before writing to DB.

 

Userlevel 2
Badge +16

To extract points {p0, p1, p1, p2, p2, p3} from a polyline p0-p1-p2-p3, you can do that with two Choppers in series.

  1. Chopper (Mode: Vertex, Maximum Vertices: 2)
  2. Chopper (Mode: Vertex, Maximum Vertices: 1)

To extract points {p0, p1, p2, p3} from the same polyline, you can just use a single Chopper.

  1. Chopper (Mode: Vertex, Maximum Vertices: 1)

I don't think you need to use SpatialRelator.

Badge

To extract points {p0, p1, p1, p2, p2, p3} from a polyline p0-p1-p2-p3, you can do that with two Choppers in series.

  1. Chopper (Mode: Vertex, Maximum Vertices: 2)
  2. Chopper (Mode: Vertex, Maximum Vertices: 1)

To extract points {p0, p1, p2, p3} from the same polyline, you can just use a single Chopper.

  1. Chopper (Mode: Vertex, Maximum Vertices: 1)

I don't think you need to use SpatialRelator.

Either one is good, I think i will be using the second one. Thank you @takashi. You are right, i don't need SpatialRelator.

Reply