Advertisement
Guest User

Untitled

a guest
Jun 25th, 2014
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. PREFIX geo: <http://www.opengis.net/ont/geosparql#>
  17. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  18. PREFIX : <http://dhlabpc2.epfl.ch/OntoWiki/vtm/#>
  19.  
  20. SELECT *
  21. FROM <http://dhlabpc2.epfl.ch/OntoWiki/vtm/>
  22.  
  23. WHERE{
  24.     # select the entity
  25.     ?entity a ?class .
  26.  
  27.     # whose class is a subclass of :class_entity
  28.     ?class rdfs:subClassOf :class_entity .
  29.  
  30.     # get details for the subclass        
  31.     ?class rdfs:label ?subclass_label .
  32.     ?class :zindex ?zindex .
  33.     ?class :min_zoom ?min_zoom .
  34.     ?class :max_zoom ?max_zoom .
  35.  
  36.     # that have a defined shape
  37.     ?entity :shape_defined_by ?geometry_defining_entity .
  38.     ?geometry_defining_entity geo:geometry ?geom .
  39.  
  40.     FILTER (
  41.         ?min_zoom <= 19
  42.          AND
  43.         ?max_zoom >= 19
  44.          AND
  45.         bif:st_intersects ( ?geom, bif:st_geomfromtext("BOX(12.3352 45.4382, 12.33521 45.43821)") )
  46.     )
  47.  
  48. }
  49. ORDER BY ?entity
  50.  
  51. LIMIT 500
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement