Question

Calculate the sum from the attributes of nearests points of a road with partial id match

  • 28 February 2020
  • 1 reply
  • 1 view

Hi,

 

I currently have 2 MapInfo table

 

-First table contains points with fields Id1 and Number1

 

-Second table contains roads with fields Id2 and Number2.

 

 

I would like to calculate Number2=Sum(Number1) when Id1=Id2 AND the points are the closest to the line.

 

The roads are divided into multiple segments but those segments have the same Id2.

Multiple points can be assigned to one segments, and all those points share the same id1=Id2.

 

So I think I should use NeighborFinder but is it possible to only search through segments with the same Id2 ?

 

Thank you

1 reply

Userlevel 2
Badge +17

Hi @usertm,

Please copy the Id1 attribute on the points to a new Id2 attribute, then set the Group By in the NeighborFinder to the attribute Id2. This will limit the neighbor searches to points and segments whose ids match.

Reply