Populating Null Values

439
2
06-05-2020 08:30 AM
WalterWilliams
New Contributor II

I have a line feature class with some null values. I want to populate the null values with the average of the two closest line features with a value. How can I do that? 

Tags (2)
0 Kudos
2 Replies
JoeBorgione
MVP Emeritus

How do you define the two closest line features with a value?

For example:

Street = N Main St and Speed Limit is null

Do you create a buffer around N Main St and pick the first two streets that intersect the buffer (where Speed Limit is not null) and use the average of those two?

Do you check to see what streets are connected to N Main St and take the first two that have non null speed limits and average them?

My point being is you may want to run a few different scenarios on paper and see what logic it would take to make it happen.  Let's say some how the two 'closest' streets to your Null Speed Limit street are a freeway (70 mph) and a local street (25 mph).  Do you really want to assign a 48 mph speed limit to it?

Apply this to whatever linear feature you might have: Null value in pipeline diameter; Null value in kilovolt transmission line, etc...

That should just about do it....
0 Kudos
WalterWilliams
New Contributor II

Hey Joe, 

I'll try the buffer option and see if that works for me.

Thanks, 

Walter 

0 Kudos