Skip to content
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

Unit returned from geo.distance() method in sensorthing API #25

Open
sudhamani1983 opened this issue Jul 22, 2017 · 2 comments
Open

Unit returned from geo.distance() method in sensorthing API #25

sudhamani1983 opened this issue Jul 22, 2017 · 2 comments
Labels
sensing v2.0 This change should be discussed for v2.0 of the sensing document.

Comments

@sudhamani1983
Copy link

sudhamani1983 commented Jul 22, 2017

Please help to provide unit details of geo.distance method.

@sudhamani1983 sudhamani1983 changed the title What is the unit of distance method in sensorthing API Unit returned from geo.distance() method in sensorthing API Jul 22, 2017
@hylkevds
Copy link
Contributor

They are in the same units as the coordinates of the coordinate system you use, or more accurately, the coordinate system that the server uses to store the geometries.

Since the default coordinate system of GeoJSON is "WGS 84, with longitude and latitude units of decimal degrees", the result of geo.distance will usually also be in decimal degrees too.

@selimnairb
Copy link

This seems to be complicated enough to be revisited in v2.0. For example, GeoJSON requires WGS84, but implementations are free to store data in any coordinate system they want. Also, users may want to specify the coordinate system to use for queries. For example, I may want to query for distance in meters from a UTM easting and northing. In this case, I would rely on the server to do the transform for me. This is more user friendly than the current form of requiring all queries to be done in WGS84 degrees.

At the very least, it seems like an oversight that an OGC standard does not explicitly represent (i.e. in a programmatically discoverable way at runtime) the coordinate system used for geographic data. Perhaps for v1.1 we can add section to the proposed server settings metadata documenting the coordinate system. This will clarify the immediate issue, while providing a foundation for potentially dealing with this more comprehensively in v2.0.

Thoughts?

@liangsteve liangsteve added sensing v2.0 This change should be discussed for v2.0 of the sensing document. and removed sensing v1.1 This change should be discussed for v1.1 of the sensing document. labels May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sensing v2.0 This change should be discussed for v2.0 of the sensing document.
Projects
None yet
Development

No branches or pull requests

5 participants