Skip to main content
Solved

CAD to GIS: Extract attributes from multiple neighbors in the same layer.


dwillow
Contributor
Forum|alt.badge.img+1

I have a CAD layer of control points which have two labels around it. I'm trying to extract the neighboring labels and add them as attributes in the final geodatabase.

 

I have tried using NeighborFinder but it captures the nearest label only. I have tried to use a Tester to differentiate between the two labels and then run NeighborFinder but it leads to multiple records.

 

The red circled is the control point and orange circled are the labels.

 

ControlPoints 

How can I capture the attributes and have 5 points in the output rather than duplicating them?

 

Workflow

Best answer by geomancer

You can use a ListSorter to sort the list alphabetical. After sorting the numbers will be in _candidates{0}, the values that start with HV will be in _candidates{1}.

Of course this will only work if you have one number and one value starting with HV in the list.

View original
Did this help you find an answer to your question?

3 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • June 6, 2023

Hi @dwillow​,

If you enable the Attribute Accumulation - Generate List option in the NeighborFinder, you will get a list of all the nearest labels instead of just the nearest. The list will be ordered by distance. You can set the Maximum Distance parameter to limit the size of the list.


dwillow
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • June 6, 2023
daveatsafe wrote:

Hi @dwillow​,

If you enable the Attribute Accumulation - Generate List option in the NeighborFinder, you will get a list of all the nearest labels instead of just the nearest. The list will be ordered by distance. You can set the Maximum Distance parameter to limit the size of the list.

I tried that but the issue is that distance is not constant. I have two types of values around the point.

  1. Values that start with "HV"
  2. Values that don't start with "HV"

I can't figure out how to group values starting with HV in one column and the rest in other.

 

NeighborFinder - Generate List


geomancer
Evangelist
Forum|alt.badge.img+48
  • Evangelist
  • Best Answer
  • June 7, 2023

You can use a ListSorter to sort the list alphabetical. After sorting the numbers will be in _candidates{0}, the values that start with HV will be in _candidates{1}.

Of course this will only work if you have one number and one value starting with HV in the list.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings