Skip to main content

Dear FME community,

I have a featureklass of lines. I want to find the start and end point of the lines. I used the Snipper transformers, setup as the screen shot below. '0' is the first vertex, '-1' is the ending vertex but the start and  end points which I created , don not lie along the line. I also used coordintateExtractor,, it gave me the same result. I couldn’t figure out what went wrong.

I would appreciate any help to solve this problem.

Sorry i forgot to attach the PrtSc of the transformers i used.

 


You lines might be collections / aggregates. You can check this using the AggregateFilter.


 I checked it, the lines are not aggregates. I have 3000 lines,  I get 3000 start points and 3000 end points but location of the startpoint and end point donot fit with the line

 


Weird. Can you provide a sample of a line where this happens? A zipped .ffs file with the line without attributes? Takes a Sampler to get one feature, an AttributeKeeper to strip all attributes and a FeatureWriter to write to ffs.


I did this once as well, used a similar approach as you did, but I did not extract all coordinates, but used a ‘specify coordinate’ extraction. This way I did not use a ListIndexer, because it is in separate transformers. Might work for your case as well


Thank you for your replay. My idee is  to label start and end point of  the line. Stlil the vertex I am making does start and  end at lines( see the printScren).

 


Instead of the Snipper try 2 CoordinateExtractor (parallel) to get the coordinates of a specified point as attributes (index 0 is the first point, -1 is the last point) and then a VertexCreator to replace the line with a point taken from those attributes


Reply