There are different situations where the Maps (Kartotherian) rendering code is confronted with duplicates. Before, it refused to render anything in most of these situations. As a first improvement we decided to show whatever comes first, see T306543. Further possible improvements:
User provides duplicate Q-ids
This is a (partially) new feature, see T305822: GeoPoints via QID. The user-provided GeoJSON might contain something like "ids": "Q1, Q1". For whatever reason. Maybe this list is generated by a template that forgot to consider duplicates.
Possible interpretations: Showing the exact same information twice is useless, no matter if it's a shape, point, or whatever. The only information is the fact that some id appears multiple times, and how often. While we could render this as a number or a note, it's very unlikely this is of any use. This is different when the GeoJSON asks for the same Q-id with different properties, e.g. different colors.
Proposal:
- Make the list unique before doing anything else with it. In other words, make "ids": "Q1, Q1" behave identical to "ids": "Q1".
- Check if it's possible to show the same Q-id twice with different properties. Discuss what should happen then.
User-provided SPARQL returns same Q-id twice
This is only for the existing feature where a SPARQL query returns nothing but Q-ids, which are then resolved and rendered as shapes.
Proposal:
- As long as there is no different information assigned to the duplicate Q-ids (e.g. different colors), drop the duplicates, as above.
- Discuss what should happen when the properties are different. It doesn't make much sense to render the same shape twice, with different colors.
User-provided SPARQL returns same coordinate twice
This is only when the query returns coordinates that are then rendered as points.
Proposal:
- Drop exact duplicates where all relevant information is identical.
- Optional: Consider only fields than make a difference on the map. This includes the Q-id, coordinates, title, description and image, but no other fields.
- Discuss what should happen when two different Q-ids have the same coordinate. These will be rendered on top of each other. One is probably unreachable for the reader.
Item actually contains multiple coordinates
Example: https://www.wikidata.org/wiki/Q833129. While this is rare and often an error (typically a missing "preferred" or "deprecated" flag), it's sometimes valid and needs to be considered. A good example is a lake that is considered a single thing, but is described with multiple shapes.
Proposal:
- As a next incremental step render all points, all the same way. Make sure this only happens when the coordinates are actually different.
- Discuss if we want to render the points somehow different, e.g. with an extra note like "Great Sea (multiple places)" or "Great Sea (1 of 2 places)".