MathiasVDA opened a new issue, #3232:
URL: https://github.com/apache/jena/issues/3232

   ### Version
   
   5.4
   
   ### Question
   
   Hello,
   
   I'm trying to run this query:
   
   ```
   PREFIX geo: <http://www.opengis.net/ont/geosparql#>
   PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
   PREFIX uom: <http://www.opengis.net/def/uom/OGC/1.0/>
   
   # Test GeoSPARQL distance calculation between two cities
   SELECT ?city1 ?city2 ?distance_km WHERE {  # Define test points with 
EPSG:4326 (WGS84) coordinate reference system
     VALUES (?city1 ?point1 ?city2 ?point2) {
       ("London" "<http://www.opengis.net/def/crs/EPSG/0/4326> POINT(-0.1276 
51.5074)"^^geo:wktLiteral "Paris" "<http://www.opengis.net/def/crs/EPSG/0/4326> 
POINT(2.3522 48.8566)"^^geo:wktLiteral)
       ("New York" "<http://www.opengis.net/def/crs/EPSG/0/4326> POINT(-74.0060 
40.7128)"^^geo:wktLiteral "Boston" 
"<http://www.opengis.net/def/crs/EPSG/0/4326> POINT(-71.0588 
42.3601)"^^geo:wktLiteral)
       ("Amsterdam" "<http://www.opengis.net/def/crs/EPSG/0/4326> POINT(4.9041 
52.3676)"^^geo:wktLiteral "Brussels" 
"<http://www.opengis.net/def/crs/EPSG/0/4326> POINT(4.3517 
50.8503)"^^geo:wktLiteral)
     }
     
     # Calculate distance in kilometers
     BIND(geof:distance(?point1, ?point2, uom:metre) / 1000 AS ?distance_km)
   }
   ORDER BY ?distance_km
   ```
   
   On an [jena fuseki geosparql 
instance](https://github.com/Matdata-eu/apache-jena-fuseki-geosparql)https://github.com/[Matdata-eu/apache-jena-fuseki-geosparql](https://github.com/Matdata-eu/apache-jena-fuseki-geosparql)
 in which I have defined the SIS_DATA variable to a writeable folder. 
   
   The result is an empty field for the ?distance_km variable. While this query 
works well on the [AKSW 
endpoint](https://geosparql.aksw.org/#/dataset/geosparql/query?query=PREFIX%20geo%3A%20%3Chttp%3A%2F%2Fwww.opengis.net%2Font%2Fgeosparql%23%3E%0APREFIX%20geof%3A%20%3Chttp%3A%2F%2Fwww.opengis.net%2Fdef%2Ffunction%2Fgeosparql%2F%3E%0APREFIX%20uom%3A%20%3Chttp%3A%2F%2Fwww.opengis.net%2Fdef%2Fuom%2FOGC%2F1.0%2F%3E%0A%0A%23%20Test%20GeoSPARQL%20distance%20calculation%20between%20two%20cities%0ASELECT%20%3Fcity1%20%3Fcity2%20%3Fdistance_km%20WHERE%20%7B%20%20%23%20Define%20test%20points%20with%20EPSG%3A4326%20%28WGS84%29%20coordinate%20reference%20system%0A%20%20VALUES%20%28%3Fcity1%20%3Fpoint1%20%3Fcity2%20%3Fpoint2%29%20%7B%0A%20%20%20%20%28%22London%22%20%22%3Chttp%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F4326%3E%20POINT%28-0.1276%2051.5074%29%22%5E%5Egeo%3AwktLiteral%20%22Paris%22%20%22%3Chttp%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F4326%3E%20POINT%282.3522%2048.856
 
6%29%22%5E%5Egeo%3AwktLiteral%29%0A%20%20%20%20%28%22New%20York%22%20%22%3Chttp%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F4326%3E%20POINT%28-74.0060%2040.7128%29%22%5E%5Egeo%3AwktLiteral%20%22Boston%22%20%22%3Chttp%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F4326%3E%20POINT%28-71.0588%2042.3601%29%22%5E%5Egeo%3AwktLiteral%29%0A%20%20%20%20%28%22Amsterdam%22%20%22%3Chttp%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F4326%3E%20POINT%284.9041%2052.3676%29%22%5E%5Egeo%3AwktLiteral%20%22Brussels%22%20%22%3Chttp%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F4326%3E%20POINT%284.3517%2050.8503%29%22%5E%5Egeo%3AwktLiteral%29%0A%20%20%7D%0A%20%20%0A%20%20%23%20Calculate%20distance%20in%20kilometers%0A%20%20BIND%28geof%3Adistance%28%3Fpoint1%2C%20%3Fpoint2%2C%20uom%3Ametre%29%20%2F%201000%20AS%20%3Fdistance_km%29%0A%7D%0AORDER%20BY%20%3Fdistance_km).
   
   When I replace 
   
   `BIND(geof:distance(?point1, ?point2, uom:metre) / 1000 AS ?distance_km)`
   
   with:
   
   `BIND(geof:distance(?point1, ?point2, uom:degree) / 1000 AS ?distance_km)`
   
   The field is not empty anymore, but degrees is not what I need :).
   
   I'm thinking this might have something to do with another problem that I 
experience. The `geof:transform` function doesn't seem to work either. Is this 
related? 
   
   Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to