-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
st_intersects() distance between points does not match with the precision parameter #34
Comments
There have been numerous improvements in Virtuoso's GeoSPARQL support (among other things) in the 4+ years since version It would be very helpful if the Virtuoso instance could be updated to a current build of Open Source Edition (as is currently in use), where I believe commits 82326dd and dc1e353 made in January 2020, may resolve the reported issue. |
I believe "st_intersects()" returns the distance in unit degrees. So, I am using the following equation to convert the distance into meters: distance [m] = 6378137.0 [m] * Pi * distance [degree] / 180.0 I am using this equation in my applications, and the results look fine. |
@JoaoAlmeida -- Starting with your equation, I compute the intended 100m distance in the cited example should instead be 0.000898315284 degrees.
Substituting that value into the example query, I get a zero row result set. Bumping the distance to 500m, inserting the new degree value in the query, I get a reasonably sized result set which may allow you to confirm that the results are as desired/expected ... and if so, that should be a clear enough demonstration that either the documentation should be changed to match (i.e., that the distance is specified in degrees, as calculated by your formula), or the function should be redefined within Virtuoso such that the distance is indeed specified in meters. |
The LinkedGeoData site has some examples of SPARQL queries. One example says it retrieves all amenities 100m from Leipzig Central Station. However, the SPARQL query results have much more distance than 100m from the Central Station.
The example's text is wrong, or the function is wrong?
Ps: I have verified the distance between the points using the OpenStreetMap site.
The text was updated successfully, but these errors were encountered: