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

Wrong distance #16

Open
seet61 opened this issue Oct 30, 2019 · 4 comments
Open

Wrong distance #16

seet61 opened this issue Oct 30, 2019 · 4 comments
Labels

Comments

@seet61
Copy link

seet61 commented Oct 30, 2019

I implemented my version based on https://tarantool.github.io/gis/intro.html
For European coordinates everithing work correctly.
{47.222531, 39.718705} I have distance 112.
But for {55.030199, 104.920430} I have distance 1.7976931348623e+308.

Why?

@seet61
Copy link
Author

seet61 commented Oct 30, 2019

tarantool-gis (0.1.22-1)

@seet61
Copy link
Author

seet61 commented Oct 30, 2019

unix/:/var/run/tarantool/master.control> gis.Point({52.506361, 103.839354}, 4326):transform(4328)
---
- POINT Z (inf inf 0)
...
unix/:/var/run/tarantool/master.control> gis.Point({47.222531, 39.718705}, 4326):transform(4328)
---
- POINT Z (3336490.407890617 3605925.221262013 4054010.729922025)
...

@Totktonada Totktonada added the bug Something isn't working label Jul 9, 2020
@Totktonada
Copy link
Member

I don't know any geoinformation system specifics, but whether latitude and longitude are passed correctly (not in the reverse order)?

The API describes the following order of arguments:

class gis.Point({lon, lat}, srid)
class gis.Point({x, y}, srid)
class gis.Point({x, y, z}, srid)

@Totktonada
Copy link
Member

BTW, it worth to note that now the example above fails this way:

$ tarantool
Tarantool 2.6.0-27-g4920782e5
type 'help' for interactive help
tarantool> box.cfg{}
tarantool> gis = require('gis')
tarantool> gis.install()
tarantool> gis.Point({52.506361, 103.839354}, 4326):transform(4328)
---
- error: '/home/alex/projects/tarantool-meta/gis/gis/projection.lua:46: PROJ: latitude
    or longitude exceeded limits'
...

I'm on 3f95c31, it is current master ATM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants