continue check_low = parcel_low check_mid = address_low check_high = parcel_high parcel_parity = \ parity_for_range(parcel_low, parcel_high) # RANGE ADDRESS => SINGLE PARCEL(S) else: check_low = address_low check_mid = parcel_low check_high = address_high parcel_parity = parity_for_num(parcel_low) if parcel_parity != address_parity: continue # If it's in range if check_low <= check_mid <= check_high: row_id = parcel_row['id'] if address_high is None: match_type = 'address_in_parcel_range' else: match_type = 'parcel_in_address_range' match_counts[match_type] += 1 matches.append({ 'parcel_row_id': row_id,
had_error('Invalid geometry') bad_geom_parcels.append(object_id) ''' STREET MATCH ''' if address: # Get the parsed street_full street_full = address.street_full if street_full in seg_map: address_low = address.address_low address_high = address.address_high street_full = address.street_full address_parity = parity_for_num(address_low) matching_segs = seg_map[street_full] matching_seg = None matching_side = None had_alias = False # TODO: check for aliases # Loop through segs for that street full for seg in matching_segs: left_from = seg['left_from'] left_to = seg['left_to'] right_from = seg['right_from'] right_to = seg['right_to'] left_parity = parity_for_range(left_from, left_to) right_parity = parity_for_range(right_from, right_to)