-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New Atlas Check] AbbreviatedAddressStreetCheck #667
[New Atlas Check] AbbreviatedAddressStreetCheck #667
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. It looks like there is just a bit of configuration and sonar clean up needed. Should this only be enabled in English speaking countries, for the moment?
This looks great @vladlemberg. Thanks! I agree with @Bentleysb that we should add a line to the configuration file that restricts this to a set of predominantly English speaking countries.
@Bentleysb - Do you think that having the street name txt file is the best way to store and access that information? It seems fine with me, but I know that we were curious if that would be acceptable, architecture wise. |
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me.
src/main/java/org/openstreetmap/atlas/checks/validation/tag/AbbreviatedAddressStreetCheck.java
Show resolved
Hide resolved
final String[] abbreviationsVariations = roadTypeAbbreviations.split("\\|"); | ||
final List<String> temp = new ArrayList<>( | ||
Arrays.asList(abbreviationsVariations)); | ||
this.roadTypeAbbreviationsMap.put(roadType, temp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given we want to search on the values, would it make more sense to invert this map? It would be less memory efficient, as the road type would be duplicated for each abbreviation. However, it seems worth it for the increase in run time from being able to drop the double for loop in the flag method, given the scale of data this is expected to run on.
Description:
A check to validate that Address Street
addr:street
road type abbreviation is spelled out in full. Please reference official OSM good practice mapping conventions.Corresponded Issues:
#597
#409
Potential Impact:
Unit Test Approach:
Simulate unit tests covering most common address types and false positives.
Test Results:
Passed.