Thanks Kingsley, I thought about distinct, but didn't know about the bif:round(?elevation) function to get the distinct to work in the query.
Best, Timo On 27 August 2010 06:43, <[email protected]>wrote: > Send Dbpedia-discussion mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Dbpedia-discussion digest..." > > Today's Topics: > > 1. Re: SPARQL DBPedia.org Query (Kingsley Idehen) > 2. Re: Interlinking DBpedia with our data set (Ainie Zeinaida Idris) > > > ---------- Forwarded message ---------- > From: Kingsley Idehen <[email protected]> > To: [email protected] > Date: Thu, 26 Aug 2010 12:08:26 -0400 > Subject: Re: [Dbpedia-discussion] SPARQL DBPedia.org Query > On 8/26/10 11:13 AM, Timo Kouwenhoven wrote: > > Dear all, > > My question might be on the silly side, but then again answering it will be > easy, so here goes: > > I'm using http://dbpedia.org/snorql to query dbpedia in order to get a > list of Airports in the United States (ICAO code starting with "K") and > their elevation and IATA code. Query included below. Works fine. > > SELECT ?resource ?hasValue ?isValueOf ?elevation ?icao ?iata > WHERE { > { <http://dbpedia.org/ontology/Elevation> ?resource ?hasValue } > UNION > { ?isValueOf ?resource <http://dbpedia.org/ontology/Airport> }. > { ?isValueOf <http://dbpedia.org/ontology/elevation> ?elevation. } > { ?isValueOf <http://dbpedia.org/ontology/icaoLocationIdentifier> ?icao. > } > OPTIONAL { ?isValueOf <http://dbpedia.org/ontology/iataLocationIdentifier> > ?iata. } > FILTER regex(?icao, "^K") > } > > The problem is that DBPedia returns every airport twice, once with > elevation as a decimal and once with elevation as a more exact decimal. > Example below: > > resource hasValue isValueOf elevation icao iata > http://www.w3.org/1999/02/22-rdf-syntax-ns#type > http://dbpedia.org/resource/Los_Angeles_International_Airport 38 KLAX LAX > http://www.w3.org/1999/02/22-rdf-syntax-ns#type > http://dbpedia.org/resource/Los_Angeles_International_Airport 38.4048 > KLAX LAX http://www.w3.org/1999/02/22-rdf-syntax-ns#type > http://dbpedia.org/resource/Washington_Dulles_International_Airport 95 > KIAD IAD http://www.w3.org/1999/02/22-rdf-syntax-ns#type > http://dbpedia.org/resource/Washington_Dulles_International_Airport > 95.4024 KIAD IAD http://www.w3.org/1999/02/22-rdf-syntax-ns#type > http://dbpedia.org/resource/Van_Nuys_Airport 244.4 KVNY VNY > http://www.w3.org/1999/02/22-rdf-syntax-ns#type > http://dbpedia.org/resource/Van_Nuys_Airport 244.4496 KVNY VNY > The question is how do I get a list with the exact decimals only? > > FILTER with regex on ?elevation in the decimal point doesn't work... > > Any ideas? > > Thanks in advance, > > Timo Kouwenhoven > http://www.skybrary.aero (aviation safety knowledge) > > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your > future.http://p.sf.net/sfu/intel-atom-d2d > > > _______________________________________________ > Dbpedia-discussion mailing > [email protected]https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion > > Try: > > SELECT distinct ?resource ?hasValue ?isValueOf bif:round(?elevation) ?icao > ?iata > WHERE { > { > <http://dbpedia.org/ontology/Elevation><http://dbpedia.org/ontology/Elevation>?resource > ?hasValue } > UNION > { ?isValueOf ?resource > <http://dbpedia.org/ontology/Airport><http://dbpedia.org/ontology/Airport>}. > { ?isValueOf > <http://dbpedia.org/ontology/elevation><http://dbpedia.org/ontology/elevation>?elevation. > } > { ?isValueOf > <http://dbpedia.org/ontology/icaoLocationIdentifier><http://dbpedia.org/ontology/icaoLocationIdentifier>?icao. > } > OPTIONAL { ?isValueOf > <http://dbpedia.org/ontology/iataLocationIdentifier><http://dbpedia.org/ontology/iataLocationIdentifier>?iata. > } > FILTER regex(?icao, "^K") > } > > -- > > Regards, > > Kingsley Idehen > President & CEO > OpenLink Software > Web: http://www.openlinksw.com > Weblog: http://www.openlinksw.com/blog/~kidehen > <http://www.openlinksw.com/blog/%7Ekidehen> > Twitter/Identi.ca: kidehen > > > > > > > > ---------- Forwarded message ---------- > From: Ainie Zeinaida Idris <[email protected]> > To: Ainie Zeinaida Idris <[email protected]>, " > [email protected]" < > [email protected]> > Date: Fri, 27 Aug 2010 12:43:06 +0800 > Subject: Re: [Dbpedia-discussion] Interlinking DBpedia with our data set > > Dear All, > > > > We would like DBpedia to be linked to our dataset. > > > > > > Data Set name: Cardiovascular > > Description : Provides information about signs and systems of > cardiovascular related diseases. > > Number of links : 100 > > Example (owl:sameAs) : http://dbpedia.org/resource/ARB > > > > > > The data set is updated on monthly basis. > > > > Our dataset is available at http://kt.mimos.my and the sparql endpoint is > at > http://202.73.13.50:56001/sparql?query=SELECT+%3fs+%3fo+%3fp+WHERE++%7b%3fs+%3chttp%3a%2f%2fwww.w3.org%2f2002%2f07%2fowl%23sameAs%3e+%3fp.%7d&id=cardio > > > > > > Thanks & Regards, > > Ainie > > *Staff Researcher,* > > *MIMOS Berhad, Malaysia* > > > > > > > > ------------------------------------------------------------------ > - > - > DISCLAIMER: > > This e-mail (including any attachments) is for the addressee(s) > only and may contain confidential information. If you are not the > intended recipient, please note that any dealing, review, > distribution, printing, copying or use of this e-mail is strictly > prohibited. If you have received this email in error, please notify > the sender immediately and delete the original message. > MIMOS Berhad is a research and development institution under > the purview of the Malaysian Ministry of Science, Technology and > Innovation. Opinions, conclusions and other information in this e- > mail that do not relate to the official business of MIMOS Berhad > and/or its subsidiaries shall be understood as neither given nor > endorsed by MIMOS Berhad and/or its subsidiaries and neither > MIMOS Berhad nor its subsidiaries accepts responsibility for the > same. All liability arising from or in connection with computer > viruses and/or corrupted e-mails is excluded to the fullest extent > permitted by law. > > > > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > _______________________________________________ > Dbpedia-discussion mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion > > -- Timo Kouwenhoven Amsterdam The Netherlands Si vales bene est, ego quoque valeo.
<<sigimage18be.jpg>>
------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________ Dbpedia-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
