-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Deduplicate transport in search #23975
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
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| if (type1.equals("natural")) { | ||
| similarityRadius = 50000; | ||
| } else if (type1.equals("transportation")) { |
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.
Same code
private static final Set FILTER_DUPLICATE_POI_SUBTYPE = new TreeSet(
Arrays.asList("building", "internet_access_yes"));
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.
Not same!
Really we need <poi_filter name="public_transport" top="true">
POI_SUBTYPE public_transport_station != public_transport_stop
| } | ||
| } | ||
| am.setRegionName(region.getName()); | ||
| am.initOrder(); |
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.
why do we change in this request?
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.
We use amenity order only in map generation. So for same location we can have several amenities in same order.
But here we need order on client side, because public_transport_station, public_transport_stop, public_transport_platform are not in the same location.
| } | ||
| break; | ||
| } | ||
| case TRANSPORTATION_ORDER: |
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.
Already exists concept for POI deduplication
} else if (ObjectType.isAddress(r1.objectType) && ObjectType.isAddress(r2.objectType)) {
if (interpolated) {
similarityRadius = 1000;
} else {
similarityRadius = 100;
}
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.
TRANSPORTATION_ORDER need for set order like (for same name="Quedlinburg"):
- public_transport_station
- public_transport_platform
- public_transport_stop
After order we can "glue" public_transport_stop and public_transport_platform into public_transport_station . Otherwise deduplication will depend from COMPARE_BY_DISTANCE
|
|
||
| public boolean isTransport() { | ||
| if (type != null) { | ||
| return "transportation".equals(type.getKeyName()); |
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.
Need change to <poi_filter name="public_transport" top="true">
| FOUND_WORD_COUNT, // more is better (top) | ||
| TRANSPORTATION_ORDER, | ||
| OBF_RESOURCE, | ||
| UNKNOWN_PHRASE_MATCH_WEIGHT, // more is better (top) |
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.
Try to increase weight for stations (railway station, aeroport, subway station).
To issue: "Deduplicate if search is by name public transport stops ( Quedlinburg ) as on screenshot - only station should be displayed and merge transpost_stop_position, platform."
#23713 (comment)