Skip to main content

Hi,

I am using CoordinateExtractor to get the start and end points of around 200k lines in a shapefile. This is working fine for around 90% of the lines, but for around 20k of them the coordinates are the same. I have inspected many of these lines and the start and end points are clearly in different places and there's nothing about them that would indicate why i'm getting a different result to all other lines in the shapefile.

Any ideas?

Look at the geometry vertices: is it possible that the line goes back and forth over itself?


@david_r

Thanks for the suggestion. There's definitely something like that happening, but i'm not sure it's the exact issue. I used the "Feature vertices to points" tool on some of these links in ArcGIS and chose the "Both Ends" option, which should only provide 2 points in output. But my output for each of the links with this issue is 2 start points and one end point (the second start point being where the line intersects with another). Not sure if this has anything to do with the problem, but it seems odd.

I'm going to split all links where they intersect with another line and see if it makes any difference.


@david_r

Thanks for the suggestion. There's definitely something like that happening, but i'm not sure it's the exact issue. I used the "Feature vertices to points" tool on some of these links in ArcGIS and chose the "Both Ends" option, which should only provide 2 points in output. But my output for each of the links with this issue is 2 start points and one end point (the second start point being where the line intersects with another). Not sure if this has anything to do with the problem, but it seems odd.

I'm going to split all links where they intersect with another line and see if it makes any difference.

Why not check details of the line feature with FME Data Inspector? You can see all coordinates of a feature with the Feature Information window in FME Data Inspector.

 

 


@takashi

Thanks for the suggestion. I'm reasonably new to FME.

I have provided the details below. I'm not sure what to make of it in the context of my original question to be honest.


@takashi

I notice that coordinate 2 of Part 0 and coordinate 0 of part 1 are the same. I guess this is where my issue is stemming from.

Is there a transformer which will separate these lines into their individual parts?


@takashi

I notice that coordinate 2 of Part 0 and coordinate 0 of part 1 are the same. I guess this is where my issue is stemming from.

Is there a transformer which will separate these lines into their individual parts?

Have a look at the Deaggregator.

@takashi @david_r

thanks for your help guys


@takashi @david_r

thanks for your help guys

Good to hear :-) I would recommend you to firstly check details of features with FME Data Inspector if you encountered a situation that you feel something strange.