Skip to main content
Solved

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

  • June 6, 2023
  • 3 replies
  • 55 views

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.

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.

3 replies

daveatsafe
Safer
Forum|alt.badge.img+20
  • 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

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+60
  • 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.