Distance Based Locality Mappings
- Dominant language
- Java
- Stars
- 17
- Forks
- 7
- Avg merge
- 10h 2m
- Merged PRs (30d)
- 15
Description
**Issue:**
When a client submits an addressString that contains an incorrect locality that is not a known alias, a penalty of 35 is taken from the score with a fault of LOCALITY.notMatched. Additional faults may be included depending on the provided addressString. Although the resulting fullAddress and coordinates may be correct, the low score leads the client to reject the result.
**Potential Cause**
Submitted address is a mailing address, not a physical address. The geographic extent of a mailing address locality can go beyond the physical boundary of a locality to overlap with other localities.
**Example:**
*Physical address:* 10055 Hewitt Rd, Takysie Lake, BC
*Mailing address:* 10055 Hewitt Rd, Burns Lake, BC V0J 1E4
*Proximity:* The boundaries of Burns Lake and Takysie Lake are approximately 20km apart and not adjacent (3x boundaries away)
**Task:**
Supplement the current locality mappings with additional distance based locality mappings. Proposal below to be adjusted as needed.
The new aliases can catch some of the non-adjacent cases and return a higher score which would be less likely to be rejected by the client. The Geocoder response would include the fault LOCALITY.isAlias with a penalty value based on the confidence level.
**Sources of Locality Mappings:**
Current State:
- DRA locality boundaries
- BCGNIS points (filtered by FCODE)
- Custom additions by the Geocoder team
Proposed addition:
- Distance based
Distance level | Distance | Confidence
------------- | ------------- | -------------
1 | 0 km - 30 km | 70%
2 | 30 km - 50 km | 60%
3 | 50 km - 70 km | 50%
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how the current DRA, BCGNIS, and custom locality mappings produce LOCALITY.notMatched and LOCALITY.isAlias faults. Review how distance and confidence would fit the proposed 0–30 km, 30–50 km, and 50–70 km levels. Done means qualifying non-adjacent localities receive the intended alias fault and confidence-based penalty without reducing correct results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design, data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100