Question

alternative for ArcGIS command "Spatial Join" in FME?

  • 22 April 2020
  • 2 replies
  • 2 views

Badge +7

Hello, 

I'm looking for an alternative to the ArcGIS command "Spatial Join" in FME. Important for me is the matching option "WITHIN_A_DISTANCE_3D".

My goal is to determine the number of neighboring points in a space from each point of a point cloud (and write it into an attribute of the point. In ArcGIS I would use the following command 

arcpy.SpatialJoin_analysis("powerline_01", "powerline_01", "e:\LAS\powerline_10m_DIST.shp", "JOIN_ONE_TO_ONE", "KEEP_ALL",""", "WITHIN_A_DISTANCE_3D", "10 Meters", "DIST_10m")

Unfortunately, I have found only similar transformers in FME, which do not work in space, but only 2D. For me it is not interesting which point is closest to the origin, but the number of points within a space.

 

Thanks a lot for any advise


2 replies

Userlevel 4
Badge +25

You can try the Clipper: if the Clipper feature is a solid and the Clippee is a point cloud it should work.

Badge +3

You could resolve it by testing with NeighborFinder in the X-Y plane, and in parallel test with another NeighborFinder in the X-Z plane. This is essentially how 3D spatial comparisons are made in equivalent GIS tools.

To do the second NeighborFinder in the X-Z plane, overwrite the existing Y value with a VertexCreator to replace it with the Z values since NeighbourFinder only looks at the X and Y values, so you'll need to substitute the Z value into the Y coordinate to use it on the X-Z plane.

Then a FeatureJoiner between the two NeighborFinder results will give the Pairs of Points that are within distance D in both the X-Y and X-Z planes. This is the nearest points within a 3D box with a side length = 2 x D.

Then it is just a final Tester on the pairs of Points within this box to check spherical distance to see if the Candidate Points are within Pythagorean distance L = √(Delta x2 + Delta y2 + Delta z2) to the Test Point. Again, this is just replicating what steps the all-in-one ArcTool like Spatial Join does in 2D/3D.

Reply