Solved

vertex remover

  • 22 February 2023
  • 7 replies
  • 14 views

Badge +4

Hello

 

there are vertex at equal distance (0.100) but these are unnecessary, only one vertex in 1m is enough. How can I remove the vertex in between, I looked for vertex remover, but I think I am doing something wrong, can you help me please?

 

Additional information: There are always 10 vertexes in 1m.

icon

Best answer by nielsgerrits 22 February 2023, 10:16

View original

7 replies

Userlevel 4

Have a look at the Generalizer. Be sure to read up on the different algorithms first to understand the differences:

https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/generalizer.htm

Userlevel 6
Badge +31

The Generalizer is the way to go for this kind of work, but I find it hard to control to keep vertices every 1 meter. As an alternative you could use a Chopper to get lines from 1m, rebuild the lines from the first and last coordinate (CoordinateExtractors, VertexCreators) and rebuild the original lines using a LineCombiner. If the vertices are not exactly every 1m, you can create extra vertices using a Densifier before the Chopper.

Badge +4

Have a look at the Generalizer. Be sure to read up on the different algorithms first to understand the differences:

https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/generalizer.htm

hello david

 

thank you for your answer but i didn't know which commands to use can you help me if i share my file

 

Badge +4

The Generalizer is the way to go for this kind of work, but I find it hard to control to keep vertices every 1 meter. As an alternative you could use a Chopper to get lines from 1m, rebuild the lines from the first and last coordinate (CoordinateExtractors, VertexCreators) and rebuild the original lines using a LineCombiner. If the vertices are not exactly every 1m, you can create extra vertices using a Densifier before the Chopper.

image.png 

nielsgerrits thank you very much I'm about to reach the conclusion one last problem remained in my file I have more than one line and when I build a line in the same layer, it combines the lines that are separate from each other, how can I prevent this?

 

 

Badge +4

image.png 

nielsgerrits thank you very much I'm about to reach the conclusion one last problem remained in my file I have more than one line and when I build a line in the same layer, it combines the lines that are separate from each other, how can I prevent this?

 

 

image

Userlevel 6
Badge +31

image.png 

nielsgerrits thank you very much I'm about to reach the conclusion one last problem remained in my file I have more than one line and when I build a line in the same layer, it combines the lines that are separate from each other, how can I prevent this?

 

 

Make sure the original lines have unique id's. This can be done using a UUIDGenerator. Then you can do a group by _uuid in the LineCombiner.

 

Looking at your workspace screenshot, I think it need to be:

  • UUIDGenerator Chopper (1m)
  • CoordinateExtractor(index 0)
  • CoordinateExtractor(index -1)
  • VertexCreator (Create point, xyz start)
  • VertexCreator (Add point, xyz end)
  • LineCombiner (Group by _uuid)
Badge +4

image.png 

nielsgerrits thank you very much I'm about to reach the conclusion one last problem remained in my file I have more than one line and when I build a line in the same layer, it combines the lines that are separate from each other, how can I prevent this?

 

 

 

nielsgerrits

 

I got a very good result, thank you very much for your suggestions

Reply