Comparing two point files with one polygon

2984
40
Jump to solution
02-01-2018 09:47 AM
HannahSmith3
New Contributor II

I am doing some QA to some addressing. I have two address point files.

One from several years ago that  the address point is placed on the buildings (which I want the newer data to do). The second is a month old that the address points are at the centroid of the parcel layer.

I need to see where adjustments are needed. I was hoping to find a method to compare the two address points for changes in the address number and road name and the differences of the placement such as that number is not found within that parcel (polygon).

Anyone have any ideas? I have a Basic Licenses for ArcMap 10.5

0 Kudos
40 Replies
HannahSmith3
New Contributor II

This is the error I got back.

0 Kudos
DanPatterson_Retired
MVP Emeritus

grief... I thought there were 6...

take out the last { } and the preceeding space

get rid of  ...  , f  (comma f

five fields... five  { } brackets

3 fields ... three  { } 

etc

0 Kudos
HannahSmith3
New Contributor II

There is 6. You forgot the 'Street Name' field in the bottom. I ran it and it worked on the ones that just have an empty cell. But not on the ones that have <Null>. I think I will select the ones that have <Null> and convert that to "" and run it again and see if that will work.

0 Kudos
DanPatterson_Retired
MVP Emeritus
def strip_space(in_flds):
    """ provide the 6 fields to strip and concatenate
    python parser"""
    fixed = []
    for i in in_flds:
        if i is not None:
            fixed.append(i) 
    frmt = "{} "*len(fixed)
    frmt.strip()    
    flds = [str(i).strip() for i in fixed]
    result = frmt.format(*fixed)
    return result

quasi generic, but will trap nulls (aka None)

0 Kudos
HannahSmith3
New Contributor II

Another error.

I attached my data to a previous comment if that would help. Have I mentioned I am eternally grateful?

0 Kudos
DanPatterson_Retired
MVP Emeritus

Hannah, I will check it out.

In the interim, I edited my code in the last post... try it and I will try it on your data

0 Kudos
HannahSmith3
New Contributor II

0 Kudos
DanPatterson_Retired
MVP Emeritus

You poor address people... spaces sometimes 2, nulls, then concatenate... sometimes 3 fields, sometimes 6.

Notice I provided a LIST (ie there are square brackets around the fields... I just chose a random number of them

The code

def strip_space(in_flds):
    """ provide the 6 fields to strip and concatenate
    python parser"""
    fixed = []
    fmt = []
    for i in in_flds:
        if i not in (" ", None):
            fixed.append(i)
            fmt.append("{}")
    frmt = " ".join([f for f in fmt])
    frmt.strip()    
    flds = [str(i).strip() for i in fixed]
    result = frmt.format(*fixed)
    return result‍‍‍‍‍‍‍‍‍‍‍‍‍‍

and the cal attached

HannahSmith3
New Contributor II

THANK YOU SOOOOOOOO MUCH!!!!!!

You are amazing!

0 Kudos
DanPatterson_Retired
MVP Emeritus

You are welcome