I have a DWG file which has lines and points. I use FME (2014) to translate it into a shapefile. This works fine but now I want to add some transformers in the workflow.

The first thing I want is to make a simplification of the line network. I did that using Generalizer. Now I want to snap the "points to point on nearest line" of the network.

Is there is transformer for this purpose?

It is a very common tool in GIS packages.

I have read online I could use a combination of "Neighbor Finder" and "2D Point Replacer".

I have followed this workflow:



Mapperz is right, the Snapper and Anchored Snapper are the ones to use. If you don't want to move the lines after you generalise them, then stick with the Anchored Snapper. Your lines will go into the Anchor port and your points into the Candidate port. The points will snap to the lines.

I have recently applied this exact workflow (Generalize and Anchored Snapper) with much success.

If you want to know how far your points are moving, you can calculate the coordinates using a CoordinateExtractor before the snap, then again after the snap and calculate the distance moved using the distance formula.

  • Thanks for the answer. I have attached an image with the workflow I do.. So if I understand correctly the Anchored Snapper moves the point on the line to the closest distance based on the tolerance value. So if there are two lines closeby the pointed will be snapped to the one closer, right? In what units is the tolerance value? – user1919 Apr 29 '15 at 7:10
  • 1
    Units are the units of your coordinate system. It will snap to closest one unless there is a group by option. I'm on my phone so can't check that. But both point and line will need to have that attribute. That way you can force snapping on groups of features. – Fezter Apr 29 '15 at 7:18
  • Ok. Thanks. Something last. I have used as snapping type: "segment snapping" cause I want to snap the candidate point on closest point on line. This would be the right option right? – user1919 Apr 29 '15 at 7:47
  • 1
    I think that's right. You may want to try both options and compare outputs. You can also use a neighbour finder if you want to identify closest points. – Fezter Apr 29 '15 at 7:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.