Skip to content

Conversation

@ivanPyrohivskyi
Copy link
Contributor

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)


if (type1.equals("natural")) {
similarityRadius = 50000;
} else if (type1.equals("transportation")) {
Copy link
Member

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"));

Copy link
Contributor Author

@ivanPyrohivskyi ivanPyrohivskyi Dec 8, 2025

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();
Copy link
Member

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?

Copy link
Contributor Author

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:
Copy link
Member

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;
						}

Copy link
Contributor Author

@ivanPyrohivskyi ivanPyrohivskyi Dec 8, 2025

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"):

  1. public_transport_station
  2. public_transport_platform
  3. 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());
Copy link
Contributor Author

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)
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants