Skip to content
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

Filter coordinates in GPX file based on current selection #95

Closed
BraveheartWikimedia opened this issue Jun 19, 2020 · 13 comments
Closed
Assignees

Comments

@BraveheartWikimedia
Copy link
Member

Hi Bene,

would it be possible to filter the coordinates in the GPX filter based on the criteria set on screen? That would help limit the displayed data on map to the objects you actually want to go to, instead of getting everything.

BR, Philip

@reiterbene
Copy link
Member

reiterbene commented Jun 19, 2020

The GPX-Link that is generated already passes the selected categories.
E.g.: https://api.wikidaheim.at/gpx.php?wikidata=Q143140&categories=request

Only the Properties-Settings (Missing Pictures/Description) do not affect the content of the GPX-File as these are filters the server isn't aware of. If we want to add those properties @pixelhaufen would have to implement it in the API first.

@BraveheartWikimedia
Copy link
Member Author

Ok, thank you, I'll talk to Ruben then. I think being able to filter by missing pictures would be a keystone of this feature.

@pixelhaufen
Copy link

Default is only objects with missing images and coordinates. Add &data=all for every object with coordinates. Please note that the wikidata part is in the moment under development and the gpx will be the last peace in the puzzle to the update.

@reiterbene
Copy link
Member

What I've done so far: If there is no filter selected (pictures/description) &data=all is attached. This should work in most cases.

@pixelhaufen there are more filter criteria available to the user (missing pictures and/or missing description) so it is currently not possible to generate a 1:1 link.

@BraveheartWikimedia does the current solution satisfy your requirements?

@BraveheartWikimedia
Copy link
Member Author

Would work for me, depends on if Ruben can use this.

@pixelhaufen
Copy link

Sorry, I have no idea how the gui-logic should be. For the gpx-api:

  • data=all returns every object (with coordinates),
  • no data=all only returns objects with missing pictures (with coordinates).

@reiterbene
Copy link
Member

we have a third case: missing description which isn't represented by the gpx-api yet

@pixelhaufen
Copy link

I know - but there is absolutely no use (at least that I'm aware of) for a gpx-file (which contains exactly what the photographers asked for) with the coordinates of objects that have no description. Even the source where it could be added is not part of the data and there is no way to find an object based on the coordinates to add the missing data... If it makes sense to send the call to return the objects with missing pictures if the user has only selected missing description is beyond my logic.

@HerziPinki
Copy link
Collaborator

Complaining user is still not satisfied:
see https://de.wikipedia.org/wiki/Wikipedia_Diskussion:WikiDaheim/2023#Fehlende_Objekte_in_gpx-Datei

the only filter applied is that of 'missing images' (with coordinates, otherwise they cannot be displayed on a map). This is the main use case that should work properly.

The gpx for Linz even shows more objects than the WikiDaheim App (unfiltered).

  • Both show Brückenkopfgebäude Ost (as Brückenkopfgebäude Ost, ehem. Finanzamt (name from Denkmalliste), Category:Brückenkopfgebäude Ost, Hauptplatz 5,6, Linz (the category name) from Commons - hope this is the same) and Brückenkopfgebäude West (similar)
  • the gpx furthermore contains Brückenkopfgebäude (Linz) and Universität für künstlerische und industrielle Gestaltung Linz (I assume from WP articles)

For each of the objects above there are three sources in Wikidaheim: the Denkmalliste, the WP article and Commons-Category. Commons-Category is unlikely to be a source (only true for empty categories).

more data, still no clue.

@BraveheartWikimedia
Copy link
Member Author

@pixelhaufen Is that something you're able to explain? Otherwise we'll have to go through it in a joint session to figure out what's going on here.

@reiterbene
Copy link
Member

Regarding the multiple entries in the GPX-File: On the Client-Side there is a merging-script that merges items with the same geocode. As this happens on the client side and the GPX-File is generated on the server-side the merging does not apply to that. (see

// loop through all non-image-requests and check if there is an image request nearby
)

@HerziPinki
Copy link
Collaborator

HerziPinki commented May 24, 2023

a case study: Hirtenberg (https://wikidaheim.at/Q687402), 33 objects, 26 thereof without image (on the frontend).

In the gpx there are 90 objects listed (filtered with no image). Content: https://www.google.com/maps/d/edit?mid=1zJGbtvzYXSiOe_ylZmKCzEtrcV6r2qQ&ll=47.92996603682447%2C16.180869293384838&z=15

  • There is a lot more objects in the surrounding municipalities. Suppose the diameter of vicinity (or whatever) is not the same on client and server. Maybe it would make sense to use the same definition for vicinity on client and server.
  • in the gpx 8 objects are inside Hirtenberg, the rest is in the vicinity.
  • in the frontend there are just 3 objects without image
Name Beschreibung Bild in gpx in frontend (w/out) in frontend (with) Quelle verlinkt nach
Hirtenberg Gemeinde in Österreich x x nein x Wikidata wikipedia
Category:Fire station in Hirtenberg Feuerwehrhaus in Hirtenberg, Österreich x x nein x Wikidata commons
Pfarrkirche Hirtenberg Kirche in Hirtenberg (54233) x x nein x Wikidata wikipedia
Kath. Pfarrkirche hl. Elisabeth   x nein nein x Denkmalliste  
Justizanstalt Hirtenberg Gefängnis in Hirtenberg, Niederösterreich x x nein x DenkmallisteWikidata wikidata verlinkt nach wikipedia?
Category:Bahnhof Hirtenberg Bahnhof in Österreich x x x Wikidata commons
Bruckerkapelle Kapelle in Hirtenberg (79527) x x nein x DenkmallisteWikidata  
Hirtenberg typische Gesamtansicht der Gemeinde Hirtenberg nein x x x Bilderwunsch wikipedia
20 Platanen Die Platanen befinden sich auf dem Gelände des ehemaligen Sommeranwesens des Industriellen Eduard von Schickh, das später als Waisenhaus diente und heute die Justizanstalt Hirtenberg beherbergt. nein x x x Naturdenkmal wikipedia
  • the parish church is a duplicate in gpx, there are slightly different coords. Source is a link to the article (https://de.wikipedia.org/wiki/Pfarrkirche_Hirtenberg) and the Denkmalliste (https://de.wikipedia.org/wiki/Liste_der_denkmalgeschützten_Objekte_in_Hirtenberg#Q2082692 - fixed (no more objektid-)). Denkmalliste row is linked to that article.
  • for the station (which is Category(!):Bahnhof Hirtenberg). If there is a category (a non-empty category), then the image in wikidata is not missing in a sense that somebody has to take it, but that somebody has to assign it to P18. This should be done, but not via the gpx file. There is a back side: If none of the images in category is good enough, then there is the need to take another photo. (how to solve this??)
  • For the Justizanstalt there is an image (the same) in the Denkmalliste, in the article (https://de.wikipedia.org/wiki/Justizanstalt_Hirtenberg) and in wikidata P18 (https://www.wikidata.org/wiki/Q1714296) - why is this object listed in the gpx? Same for Bruckerkapelle.
  • For the fire station there is a non-empty category under https://commons.wikimedia.org/wiki/Category:Fire_station_in_Hirtenberg under https://commons.wikimedia.org/wiki/Category:Fire_stations_in_Austria (which is the necessary root category) - why is this object listed in the gpx? We can assume that there are an endless number of fire stations, schools, etc. in the municipality, but this is not true. What is the difference to 'Friedhof Hirtenberg', where we have a commons category, and cemeteries and fire stations are both topic commons? The difference is that the firestation has a wikidata entry, while the cemetery doesn't. I would prefer a text similar to 'Friedhof Hirtenberg' also for other fire stations, schools and the like: 'there might be more cemeteries, more fire stations'- we should not consider them as missing when we have one of them. We do not have coordinates for the assumed additional stuff, either.
  • 20 Platanen is ok

(for the station I added an image to wikidata P18 - so the behaviour might change)

@reiterbene
Copy link
Member

Solution: generate GPX file on the fly in fronte-end.

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

No branches or pull requests

4 participants