Skip to main content
Solved

How to extract coordinates of start and end line and get the relates id of each point (start/end)


gogopotter90
Contributor
Forum|alt.badge.img+13

Hello ,

i am confused in my workspace .

i would like to extract the coordinates of start point and end point of the lines .

So I used coordinates extractor index 0 , and other coordinates extractor index -1 .

so I got the coordinates .

but how I know , this coordinates belong for which point id ( I mean which side of line is start and which side is -the end ) and depends on what ?

my target to get the coordinates and the relates points id to it .

I would like to get theses attributes

ID line | id point start | coordinates (x)start | coordinates (y) end | id point end |coordinates (x) end |coordinates (y) end

as example .

see picture , I need to extract the coordinates of each line ( start and end ) and know which id of the point that relates to this coordinate

Fme 2021

 

Best answer by takashi

gogopotter90 wrote:

This is was my problem .

i have did what u do before but I was so confusing .

I have the points id ,you are right

i will exapling in Details .

i know the start point id and end point id

and I have added a list on the line

so the line has now more details ,about the point that it connects with .

id line , id point a ,id point b

later after I use 2 vertex creator and find points by neighbour finder .

how to merge them with 2 point id at the same Line ?

i am really confusing about it .

Bcs as example

i have 3 end line ( points id ) are the same id .

so when I do merge May be ,coordinates go to wrong line .

when the id is the same .

(the id is same at some end lines Bcs I have used buffer and cut the lines that connect together in one point

so instead of one point ,I have different point include same point id .

please , id U can provide me with temperate solution .or screenshot ,will be better for me to get clear ur solution .

thanks a lot in advanc

 

Good to hear the workflow helps you.

You can avoid overwriting the same attribute names by setting Prefix Supplier to the Accumulation Mode parameter and set an appropriate prefix to the Prefix parameter, in the FeatureMerger.

Please check again the screenshot I posted.set-prefix-with-featuremerger

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

9 replies

redgeographics
Celebrity
Forum|alt.badge.img+50

Just to clarify: you have those id points already, correct?

 

If that's the case you can use 2 VertexCreators to create the actual start and end points of the lines from your attribute values, then a NeighborFinder to match them with the id points. Then you have to bring it all back to the original lines again (FeatureMerger for example).


gogopotter90
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • December 1, 2023
redgeographics wrote:

Just to clarify: you have those id points already, correct?

 

If that's the case you can use 2 VertexCreators to create the actual start and end points of the lines from your attribute values, then a NeighborFinder to match them with the id points. Then you have to bring it all back to the original lines again (FeatureMerger for example).

This is was my problem .

i have did what u do before but I was so confusing .

I have the points id ,you are right

i will exapling in Details .

i know the start point id and end point id

and I have added a list on the line

so the line has now more details ,about the point that it connects with .

id line , id point a ,id point b

later after I use 2 vertex creator and find points by neighbour finder .

how to merge them with 2 point id at the same Line ?

i am really confusing about it .

Bcs as example

i have 3 end line ( points id ) are the same id .

so when I do merge May be ,coordinates go to wrong line .

when the id is the same .

(the id is same at some end lines Bcs I have used buffer and cut the lines that connect together in one point

so instead of one point ,I have different point include same point id .

please , id U can provide me with temperate solution .or screenshot ,will be better for me to get clear ur solution .

thanks a lot in advanc

 


takashi
Influencer
  • December 1, 2023
gogopotter90 wrote:

This is was my problem .

i have did what u do before but I was so confusing .

I have the points id ,you are right

i will exapling in Details .

i know the start point id and end point id

and I have added a list on the line

so the line has now more details ,about the point that it connects with .

id line , id point a ,id point b

later after I use 2 vertex creator and find points by neighbour finder .

how to merge them with 2 point id at the same Line ?

i am really confusing about it .

Bcs as example

i have 3 end line ( points id ) are the same id .

so when I do merge May be ,coordinates go to wrong line .

when the id is the same .

(the id is same at some end lines Bcs I have used buffer and cut the lines that connect together in one point

so instead of one point ,I have different point include same point id .

please , id U can provide me with temperate solution .or screenshot ,will be better for me to get clear ur solution .

thanks a lot in advanc

 

HI @gogopotter90​ ,

Do you have point features each of which has point ID as its attribute? If yes, does a point exactly match start or end of a line?


gogopotter90
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • December 2, 2023
gogopotter90 wrote:

This is was my problem .

i have did what u do before but I was so confusing .

I have the points id ,you are right

i will exapling in Details .

i know the start point id and end point id

and I have added a list on the line

so the line has now more details ,about the point that it connects with .

id line , id point a ,id point b

later after I use 2 vertex creator and find points by neighbour finder .

how to merge them with 2 point id at the same Line ?

i am really confusing about it .

Bcs as example

i have 3 end line ( points id ) are the same id .

so when I do merge May be ,coordinates go to wrong line .

when the id is the same .

(the id is same at some end lines Bcs I have used buffer and cut the lines that connect together in one point

so instead of one point ,I have different point include same point id .

please , id U can provide me with temperate solution .or screenshot ,will be better for me to get clear ur solution .

thanks a lot in advanc

 

Yes.

I have point id and it matches sometimes exactly the start or end of line

or it is close from the start or end of line and I have to use neighbour finder to find (which point of start /end line close to ) .


takashi
Influencer
  • December 2, 2023
gogopotter90 wrote:

This is was my problem .

i have did what u do before but I was so confusing .

I have the points id ,you are right

i will exapling in Details .

i know the start point id and end point id

and I have added a list on the line

so the line has now more details ,about the point that it connects with .

id line , id point a ,id point b

later after I use 2 vertex creator and find points by neighbour finder .

how to merge them with 2 point id at the same Line ?

i am really confusing about it .

Bcs as example

i have 3 end line ( points id ) are the same id .

so when I do merge May be ,coordinates go to wrong line .

when the id is the same .

(the id is same at some end lines Bcs I have used buffer and cut the lines that connect together in one point

so instead of one point ,I have different point include same point id .

please , id U can provide me with temperate solution .or screenshot ,will be better for me to get clear ur solution .

thanks a lot in advanc

 

I think ToplogyBuilder helps you to transfer attributes of point feature (point ID, x-coordinates and y-coordinates) to the lines.

Try the workflow shown in the attached screenshot. Probably you will have to set an appropriate value to the Tolerance parameter in the TopologyBuilder.topologybuilder-exampleAdditionally, if you would like to make coordinates of all the end nodes of lines exactly match the points, you can use AnchoredSnapper to do that before TopologyBuilder.


takashi
Influencer
  • December 2, 2023
gogopotter90 wrote:

This is was my problem .

i have did what u do before but I was so confusing .

I have the points id ,you are right

i will exapling in Details .

i know the start point id and end point id

and I have added a list on the line

so the line has now more details ,about the point that it connects with .

id line , id point a ,id point b

later after I use 2 vertex creator and find points by neighbour finder .

how to merge them with 2 point id at the same Line ?

i am really confusing about it .

Bcs as example

i have 3 end line ( points id ) are the same id .

so when I do merge May be ,coordinates go to wrong line .

when the id is the same .

(the id is same at some end lines Bcs I have used buffer and cut the lines that connect together in one point

so instead of one point ,I have different point include same point id .

please , id U can provide me with temperate solution .or screenshot ,will be better for me to get clear ur solution .

thanks a lot in advanc

 

This is an example using AncheredSnapper

topologybuilder-anchoredsnapper-example


gogopotter90
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • December 4, 2023
gogopotter90 wrote:

This is was my problem .

i have did what u do before but I was so confusing .

I have the points id ,you are right

i will exapling in Details .

i know the start point id and end point id

and I have added a list on the line

so the line has now more details ,about the point that it connects with .

id line , id point a ,id point b

later after I use 2 vertex creator and find points by neighbour finder .

how to merge them with 2 point id at the same Line ?

i am really confusing about it .

Bcs as example

i have 3 end line ( points id ) are the same id .

so when I do merge May be ,coordinates go to wrong line .

when the id is the same .

(the id is same at some end lines Bcs I have used buffer and cut the lines that connect together in one point

so instead of one point ,I have different point include same point id .

please , id U can provide me with temperate solution .or screenshot ,will be better for me to get clear ur solution .

thanks a lot in advanc

 

Thanks a lot .

it works great , I needed only to add rename after first feature merger for point id and coordinates .because the result has overwritten on same name of point id so I added rename but it works great .


takashi
Influencer
  • Best Answer
  • December 4, 2023
gogopotter90 wrote:

This is was my problem .

i have did what u do before but I was so confusing .

I have the points id ,you are right

i will exapling in Details .

i know the start point id and end point id

and I have added a list on the line

so the line has now more details ,about the point that it connects with .

id line , id point a ,id point b

later after I use 2 vertex creator and find points by neighbour finder .

how to merge them with 2 point id at the same Line ?

i am really confusing about it .

Bcs as example

i have 3 end line ( points id ) are the same id .

so when I do merge May be ,coordinates go to wrong line .

when the id is the same .

(the id is same at some end lines Bcs I have used buffer and cut the lines that connect together in one point

so instead of one point ,I have different point include same point id .

please , id U can provide me with temperate solution .or screenshot ,will be better for me to get clear ur solution .

thanks a lot in advanc

 

Good to hear the workflow helps you.

You can avoid overwriting the same attribute names by setting Prefix Supplier to the Accumulation Mode parameter and set an appropriate prefix to the Prefix parameter, in the FeatureMerger.

Please check again the screenshot I posted.set-prefix-with-featuremerger


gogopotter90
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • December 5, 2023
gogopotter90 wrote:

This is was my problem .

i have did what u do before but I was so confusing .

I have the points id ,you are right

i will exapling in Details .

i know the start point id and end point id

and I have added a list on the line

so the line has now more details ,about the point that it connects with .

id line , id point a ,id point b

later after I use 2 vertex creator and find points by neighbour finder .

how to merge them with 2 point id at the same Line ?

i am really confusing about it .

Bcs as example

i have 3 end line ( points id ) are the same id .

so when I do merge May be ,coordinates go to wrong line .

when the id is the same .

(the id is same at some end lines Bcs I have used buffer and cut the lines that connect together in one point

so instead of one point ,I have different point include same point id .

please , id U can provide me with temperate solution .or screenshot ,will be better for me to get clear ur solution .

thanks a lot in advanc

 

Thanks a lot ,I have seen it now


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