Advertisement
Guest User

Untitled

a guest
Jun 25th, 2014
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SPARQL 1.67 KB | None | 0 0
  1. ##### THE FOLLOWING QUERY GIVES ME THIS ERROR :
  2. # Warning: odbc_exec(): SQL error: [unixODBC][OpenLink][Virtuoso iODBC Driver][Virtuoso Server]SQ200: Stack Overflow in cost model, SQL state 37000 in SQLExecDirect in /var/www/html/ontowiki-scripts/model_the_source-virtuoso_to_webmap.php on line 20
  3.  
  4. ##### BUT IT WORKS IF I COMMENT OUT (in the FILTER clause)
  5. # AND
  6. # bif:st_intersects ( ?geom, bif:st_geomfromtext("BOX(<?=$xmin?> <?=$ymin?>, <?=$xmax?> <?=$ymax?>)") )
  7.  
  8. ##### AND IT ALSO WORKS IF I COMMENT OUT (in the FILTER clause)
  9. # ?min_zoom <= "<?=$zoom?>"^^xsd:integer
  10. # AND
  11. # ?max_zoom >= "<?=$zoom?>"^^xsd:integer
  12. # AND
  13.  
  14. ##### SO IT'S ONLY WHEN I COMBINE BOTH THAT I GET THE ERROR ?!?!
  15.  
  16.  
  17. PREFIX geo: <http://www.opengis.net/ont/geosparql#>
  18. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  19. PREFIX : <http://dhlabpc2.epfl.ch/OntoWiki/vtm/#>
  20.  
  21. SELECT *
  22. FROM <http://dhlabpc2.epfl.ch/OntoWiki/vtm/>
  23.  
  24. WHERE{
  25.     # select the entity
  26.     ?entity a ?class .
  27.  
  28.     # whose class is a subclass of :class_entity
  29.     ?class rdfs:subClassOf :class_entity .
  30.  
  31.     # get details for the subclass        
  32.     ?class rdfs:label ?subclass_label .
  33.     ?class :zindex ?zindex .
  34.     ?class :min_zoom ?min_zoom .
  35.     ?class :max_zoom ?max_zoom .
  36.  
  37.     # that have a defined shape
  38.     ?entity :shape_defined_by ?geometry_defining_entity .
  39.     ?geometry_defining_entity geo:geometry ?geom .
  40.  
  41.     FILTER (
  42.         ?min_zoom <= "<?=$zoom?>"^^xsd:integer
  43.          AND
  44.         ?max_zoom >= "<?=$zoom?>"^^xsd:integer
  45.          AND
  46.         bif:st_intersects ( ?geom, bif:st_geomfromtext("BOX(<?=$xmin?> <?=$ymin?>, <?=$xmax?> <?=$ymax?>)") )
  47.     )
  48.  
  49. }
  50. ORDER BY ?entity
  51.  
  52. LIMIT 500
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement