Skip to main content
Question

User parameter as Input Coordinate

  • August 5, 2020
  • 2 replies
  • 57 views

 

Hi im new to Fme. Im trying to build a script where I have coordinates as an input(longitude and latitude) and then find the closest substation to those coordinates. I have managed to get the coordinates for the substations but I don’t now how to make my input to coordinates. Im thinking of using NeighborFinder after to find the closest substation.  I would be grateful if anyone have any tips to solve this?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

srg
Forum|alt.badge.img+10
  • August 5, 2020

@andre7​ if you have the coordinates from a spreadsheet or csv, use a ​VertexCreator with the mode set to Add Point and the respective coordinates set to appropriate columns in your spreadsheet.

http://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/vertexcreator.htm

The​n use NeighbourFinder.

Hope this helps

Happy FME-ing :-)​


jdh
Contributor
Forum|alt.badge.img+38
  • Contributor
  • August 5, 2020

Do you want to have a bunch of coordinates, and the closest substation to each? In which case srg's suggestion is a good one.

 

If you want a unique point that the user enters as a parameter each time the workspace is run, you have two choices.

 

A: Create two Number parameters, once for lat, and one for long, you can specify the domain on each (-90 to 90), (-180 to 180).

Use a vertex creator in the workspace.

 

B: Create a Geometry parameter , which can be entered as a GeoJSON.

Use a GeometryReplacer in the workspace.

This approach is very interesting if the workspace is run through FME Server, as you can graphically pick the coordinate on a map. See https://community.safe.com/s/article/using-the-geometry-picker-in-fme-server for details.