query: SELECT ?item ?itemLabel ?pbLabel ?cat ?coord ?img (IF(BOUND(?img), ?usage, "") AS ?usage) (IF(BOUND(?img), ?artist, "") AS ?artist)
  WITH {
    SELECT ?item (SAMPLE(?cat) AS ?cat) (SAMPLE(?coord) AS ?coord) (SAMPLE(?img) AS ?img)
                 WHERE {
                   wd:Q75849591 wdt:P527 [ wdt:P527 ?item; wdt:P361 ?pb ].
                   ?pb wdt:P31 wd:Q76598130.
                   ?item wdt:P625 ?coord.
                   OPTIONAL { ?item wdt:P373 ?cat. }
                   OPTIONAL { ?item wdt:P18 ?img. }
                 } GROUP BY ?item
  } as %items
  WHERE {
    INCLUDE %items .
  
    BIND(STRAFTER(wikibase:decodeUri(STR(?img)), "http://commons.wikimedia.org/wiki/Special:FilePath/") AS ?fileTitle)
  
    SERVICE wikibase:mwapi {
      bd:serviceParam wikibase:endpoint "commons.wikimedia.org";
                      wikibase:api "Generator";
                      wikibase:limit "once";
                      mwapi:generator "allpages";
                      mwapi:gapfrom ?fileTitle;
                      mwapi:gapnamespace 6; # NS_FILE
                      mwapi:gaplimit "1";
                      mwapi:prop "imageinfo";
                      mwapi:iiprop "extmetadata" ;
                      mwapi:iiextmetadatafilter "UsageTerms|Artist" .
  
      ?usage wikibase:apiOutput "imageinfo/ii/extmetadata/UsageTerms/@value".
      ?artist wikibase:apiOutput "imageinfo/ii/extmetadata/Artist/@value".
    }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
  }