3

I'm trying several queries on the site : http://geosparql.org/

I'm very interested in trying the clause : NEARBY, for example this query using NEARBY in this way:

PREFIX spatial:<http://jena.apache.org/spatial#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX geo:<http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX gn:<http://www.geonames.org/ontology#>

Select * 
WHERE{
?object spatial:nearby(40.74 -73.989 1 'mi').
?object rdfs:label ?label
}LIMIT 10

When i execute the query on site http://geosparql.org/ all is ok but now i desire download the GeoNames Ontology and execute it on my PC.

here i have found the ontology for download: http://www.geonames.org/ontology/documentation.html

He tells me that The Ontology for GeoNames is available in OWL :

http://www.geonames.org/ontology/ontology_v3.1.rd

I download it but when i open ontology with software Protegè or with Sparql Droid on my smarphone Android and execute same query I get no data maybe the ontology is empty?

How do I fill the ontology, in order to run this query?

Thank you very much to those who will help me.

1
  • Ok but how can import the individual for execute and obtain data for this query or similar ? Jun 10, 2015 at 21:04

2 Answers 2

2

The ontology is the vocabulary (i.e., definition of classes, properties, etc.) An ontology doesn't necessarily include the individuals (e.g., the places, locations, etc.) that you might be interested in. In this case, I think you've downloaded the ontology, which is relatively small, but you're probably interested in the data dumps that that page describes later. I think the fourth option is the one that you want:

Entry Points into the GeoNames Semantic Web

There are several ways how you can enter the GeoNames Semantic Web :

  • RDF dump with 10113356 features and about 150 mio rdf triples (2015 04 21). The dump has one rdf document per toponym on every line of the file. Note: The file is pretty large. Make sure the tool you use to uncompress is able to deal with the size and does not stop after 2GB, an issue that happens with some old (windows) tool versions.
2
  • ok but it open a big file .txt about 12GB insteand i have found at this link link other txt example the IT.zip file but my problem is how Import .txt individual in ontology with Protegè? Jun 10, 2015 at 21:43
  • 1
    @javierZanetti Check the readme in that zip file, though. That's not RDF content; it's raw data from the database dumps. You can't load that into Protege directly. Jun 11, 2015 at 2:39
2

Open the web page geonames then Clic on the given OWl URI Geonames Ontology the geonames onto is then downloaded. open protégé then menu File> Open and import the owl document the ontology concepts is then added to protégé; use it to add your own instanc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.