Skip to main content

Here's an example of the ranges:

rangersAnd I want to check my own point addresses to see if they're outside of the ranges. 

uniqueidI've looked at the AttributeRangeFliter, but you have to plug in your own MinMax. Any ideas on where to start? I'm thinking the tester or test filter would work, but I'm trying to plug in mix/max from a table and it's treating it as a row.

 

Edit: Now I'm thinking I can just join the ranges and the addresses based on the street name. They're formatted the same so why not? addressaddressrangeI have 39k Points and 2300 ranges. When I join based on street names i get 236k rows!

joinMy idea is to join the streets then just run it through a 'in range' in the tester. When i do that I have duplicates for some reason. I'm all confused! 

 

EDIT 2:

So i ran that through the test filter with these parameters:testfilterIt's kicking back 41,084 records that match that. Do I need to group by or filter them down further?

 

EDIT 3:

After looking at the data a little more its starting to make more sense, but leaving me more questions. In this screenshot I'm showing the joins on the ranges on E Phillips Pl. Since there are 8 different ranges it's showing 8 records for each address (it's why there are 236k records. I think I need to make a subset of the ranges to compare each one back to? 

ToFromHere is a python script for the logic on it. I think it needs to be put into a list or subset of the data to search against the address number.

import arcpy
import csv
 
#PARAMETERS
address_range_csv = 'path' #path to address range csv file
add_pts = 'path' #path to subest of SiteAddressPoint feature class
 
#SCRIPT
#build range list from csv
print('Building range list from CSV')
with open(address_range_csv, 'r') as file:
    reader = csv.reader(file)
    range_list = list(reader)
 
#check if address points are within address ranges
print('Checking if address points are within address ranges')
for row in arcpy.da.SearchCursor(add_pts, C'Unique_ID', 'ADDRNUM', 'FULLNAME']):
    #set parameters
    unq_id = row.0]
    addr_num = rowr1]
    street = rowr2]
    match = False
    #get subset of address ranges that are on same street as address point
    range_subset = di for i in range_list if ir0] == street]
    #check if address point is within each address range in subset
    for r in range_subset:
        range_min = r 1]
        range_max = r<2]
        if addr_num >= range_min and addr_num <= range_max:
            match == True
    #print address point IDs that don't fall in an address range
    if match == False:
        print(unq_id)
        
    

Any thoughts after seeing the code?

Hi @mjones​ 

Assuming you only want to compare features that has matches the Street_Name attribute (eg. Unique_ID=4374EPHILLIPSPL with Street_Name=EPHILLIPSPL), you can try splitting the Unique_ID value into street number and street name. Use a FeatureJoiner/FeatureMerger to join on the street name attributes and then use a Tester/TestFilter to test if the street number falls within the joined range values.

mJoines_TestRange


Hi @mjones​ 

Assuming you only want to compare features that has matches the Street_Name attribute (eg. Unique_ID=4374EPHILLIPSPL with Street_Name=EPHILLIPSPL), you can try splitting the Unique_ID value into street number and street name. Use a FeatureJoiner/FeatureMerger to join on the street name attributes and then use a Tester/TestFilter to test if the street number falls within the joined range values.

mJoines_TestRange

Exactly what I was thinking. Then from there run it through the tester and set the range against the address number since it's already joined on the street name. I'm just getting funny results.


Exactly what I was thinking. Then from there run it through the tester and set the range against the address number since it's already joined on the street name. I'm just getting funny results.

Hi @mjones​ 

What sort of funny results are you seeing?

Are you able to share a small sample of your data which demonstrates the unexpected behaviour?


Exactly what I was thinking. Then from there run it through the tester and set the range against the address number since it's already joined on the street name. I'm just getting funny results.

I uploaded the data and the workbench.

It might be something with the join. It doesn't make sense it has so many records.


The approach i'd take would be taking all your ranges and 'exploding' them out to the individual address. I've attached a workbench (2019.1) showing the logic for this


The approach i'd take would be taking all your ranges and 'exploding' them out to the individual address. I've attached a workbench (2019.1) showing the logic for this

I don't think I'm following this? I'm trying to verify if the address point is either within the range of the two numbers or not in the range. I don't understand subtracting the to and from numbers?


I don't think I'm following this? I'm trying to verify if the address point is either within the range of the two numbers or not in the range. I don't understand subtracting the to and from numbers?

So from the ouput of that you have all possible addresses in that range. You can now use a merger to merge the address that are in the range. any unmerged will be outside that range. You'll need to build the address string to make sure they both match


I don't think I'm following this? I'm trying to verify if the address point is either within the range of the two numbers or not in the range. I don't understand subtracting the to and from numbers?

I see the logic! I was too far down the other rabbit hole.

This issue I'm having with this is it's creating an address within that range even though the address doesn't exist. When I make a join or merge it has a bunch of false addresses in that range that don't exist. On either side of the street addresses aren't sequential, but skip around. How do I verify these false positives? The ranges are creating over 300k points and I only have 35k residential to verify.

I tried with join and merge and got the same numbers.

alladd


I don't think I'm following this? I'm trying to verify if the address point is either within the range of the two numbers or not in the range. I don't understand subtracting the to and from numbers?

I'd be putting the 35k features in through the requestor port, and the 300k in the supplier. It looks like you might have some overlapping ranges and therefore some duplicate address in the exploded dataset. Use a duplicate filter to remove those.

Anything coming out the merged port will fall within the ranges, and anything coming out hte unmerged requestor port will be outside that range


Exactly what I was thinking. Then from there run it through the tester and set the range against the address number since it's already joined on the street name. I'm just getting funny results.

Here is a workflow that builds on the workspace you shared. Create an InRange attribute for the FeatureJoiner output--value is True if in range, empty string if not. Then aggregate the feature based on ObjectID and concatenate the InRange attribute. Test if InRange contains empty string or not. If yes, then the address was not range.

Note: I had to change the FeatureJoiner join attribute in order to work with the datasets you shared


Reply