Visar inlägg med etikett Geospatial. Visa alla inlägg
Visar inlägg med etikett Geospatial. Visa alla inlägg

tisdag 26 juli 2016

Geospatial searches in WikiData : WikiTree people buried in a 5 km radius from Chicago

Geospatial searches in WikiData Q1297 Chicago

http://tinyurl.com/gtc2pwv


# Query Find people in WikiTree buried
# 10 km from Q1297 Chicago
#
SELECT  ?placeOfBurial ?placeOfBurialLabel ?person ?personLabel ?WikiTree ?chicagoLoc  WHERE {
    {
    wd:Q1297 wdt:P625 ?chicagoLoc . #Find location Chicago

    ?person  wdt:P119 ?placeOfBurial. 
     {?person  wdt:P2949 ?WikiTreeID}.
    SERVICE wikibase:around {
      ?placeOfBurial wdt:P625 ?location .
      bd:serviceParam wikibase:center ?chicagoLoc .
      bd:serviceParam wikibase:radius "10" .
      bd:serviceParam wikibase:distance ?dist.
    }                      

    BIND (URI(CONCAT("http://www.wikitree.com/wiki/",?WikiTreeID)) AS ?WikiTree)

 }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en"}
}
LIMIT 10000

See also:

Location search in WikiData on Stockholm

# Query Find people in WikiTree
# 100 km from Q1754 Stockhlom
#
#defaultView:Mapxx
#SELECT DISTINCT ?placeOfBurial  ?placeOfBurialLabel ?coord ?pic ?WikiTreeID WHERE {
#SELECT DISTINCT ?person ?personLabel WHERE {
SELECT  ?placeOfBurial ?placeOfBurialLabel ?person ?personLabel ?WikiTreeID WHERE {
    {
    wd:Q1754 wdt:P625 ?sthlmLoc . #Find location Stockholm

    ?person  wdt:P119 ?placeOfBurial.

    SERVICE wikibase:around {
      ?placeOfBurial wdt:P625 ?location .
      bd:serviceParam wikibase:center ?sthlmLoc .
      bd:serviceParam wikibase:radius "3" .
      bd:serviceParam wikibase:distance ?dist.
    }                    
    OPTIONAL {?person  wdt:P2949 ?WikiTreeID}.

}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en"}
}
LIMIT 10000

Result

  • Query
    • Result
    • Map - problem that more points on the same spot are just displaying one
    • Image Gallery

Location search 10 km Freehold Township, New Jersey

# Query Find Q19558910 Place listed on the National Register of Historic Places

# 100 km from Q1077969 Freehold Township, New Jersey
#
#defaultView:Map
SELECT DISTINCT ?place  ?placeLabel ?coord ?pic ?ref WHERE {
    {
    wd:Q1077969 wdt:P625 ?freeholdLoc . #Find location
?place wdt:P1435   wd:Q19558910 #Find Heritage status P1435 is Q19558910 Place listed on the National Register of Historic Places
         
    SERVICE wikibase:around {
      ?place wdt:P625 ?location .
      bd:serviceParam wikibase:center ?freeholdLoc .
      bd:serviceParam wikibase:radius "100" .
      bd:serviceParam wikibase:distance ?dist.
    }        
OPTIONAL{?place wdt:P625 ?coord} . #Get the coordinates
OPTIONAL{?place wdt:P18 ?pic} .   #Get a Picture
OPTIONAL{?place wdt:P649 ?refnr} .   #Ref
    BIND(URI(CONCAT("http://focus.nps.gov/AssetDetail/NRIS/",?refnr)) as ?ref)
}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en","fr","nl","de","fa"}
}
LIMIT 100000

Map