Skip to main content

 

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?

@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 :-)​


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.


Reply