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

Latitude and Longitudes swap for geometries when SRID is present in edit mode #16326

Closed
shucon opened this issue Aug 30, 2020 · 6 comments · Fixed by #16391
Closed

Latitude and Longitudes swap for geometries when SRID is present in edit mode #16326

shucon opened this issue Aug 30, 2020 · 6 comments · Fixed by #16391
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
Milestone

Comments

@shucon
Copy link
Contributor

shucon commented Aug 30, 2020

Describe the bug

Latitude and Longitudes switch for geometries when SRID is present

To Reproduce

Steps to reproduce the behavior:

  1. Go to workd_borders table
  2. Visualize the GIS data to visit see any country
  3. Notice it's latitudes and longitudes
  4. Now go to edit menu to edit the geometry of the country.
  5. The Latitudes and Longitudes are swapped and the country would be in a different place (if the latitude and longitude range is still valid.Eg: Aruba)

Expected behavior

Latitude and Longitudes should be consistent

Screenshots

Screenshot from 2020-08-31 00-13-28
Screenshot from 2020-08-31 00-14-26

Server configuration

-Operating system: Ubuntu 20.04
-Web server: Apache
-Database version: libmysql - mysqlnd 7.4.3
-PHP version: 7.4.3
-phpMyAdmin version: 5.0, master

@williamdes
Copy link
Member

Affects 4.9->master ?

@williamdes williamdes added the Bug A problem or regression with an existing feature label Sep 2, 2020
@shucon
Copy link
Contributor Author

shucon commented Sep 2, 2020

In 4.9 the lat and long are swapped for both visualising modes. Does that need to be another issue?
Screenshot from 2020-09-02 13-15-42

@williamdes
Copy link
Member

In 4.9 the lat and long are swapped for both visualising modes. Does that need to be another issue?
Screenshot from 2020-09-02 13-15-42

No because 4.9 will only receive security fixes :)
If 5.0 demo is affected you can create an issue

What I want to know is if this issue also affects 5.0 because you only filled "master"

@shucon
Copy link
Contributor Author

shucon commented Sep 2, 2020

Oh! my bad. Yes, it affects 5.0 as well only in the edit mode.

@williamdes williamdes added this to Needs triage in issues via automation Sep 2, 2020
@shucon
Copy link
Contributor Author

shucon commented Oct 8, 2020

Starting to work on this.

shucon added a commit to shucon/phpmyadmin that referenced this issue Oct 8, 2020
@shucon
Copy link
Contributor Author

shucon commented Oct 8, 2020

Seems like the default way to return geometry is swapped and thus needs to be specifically mentioned.
See: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/41250c42-25e6-4de7-953e-a6c41ada383f/xy-coords-reversed-in-wkt-amp-wkb-methods-in-nov-ctp?forum=sqlspatial

@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Oct 10, 2020
shucon added a commit to shucon/phpmyadmin that referenced this issue Oct 12, 2020
williamdes added a commit that referenced this issue Oct 12, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
shucon added a commit to shucon/phpmyadmin that referenced this issue Oct 12, 2020
commit 25e2cea
Author: Saksham Gupta <shucon01@gmail.com>
Date:   Mon Oct 12 12:57:12 2020 +0530

    Fix lint

    Signed-off-by: Saksham Gupta <shucon01@gmail.com>

commit 906013a
Author: Saksham Gupta <shucon01@gmail.com>
Date:   Mon Oct 12 12:44:18 2020 +0530

    Conditional axisOrder

    Signed-off-by: Saksham Gupta <shucon01@gmail.com>

commit 606af7e
Author: Saksham Gupta <shucon01@gmail.com>
Date:   Fri Oct 9 00:45:42 2020 +0530

    Fix Latitude and Longitudes swap
    Fixes: phpmyadmin#16326
shucon added a commit to shucon/phpmyadmin that referenced this issue Oct 12, 2020
commit 25e2cea
Author: Saksham Gupta <shucon01@gmail.com>
Date:   Mon Oct 12 12:57:12 2020 +0530

    Fix lint

    Signed-off-by: Saksham Gupta <shucon01@gmail.com>

commit 906013a
Author: Saksham Gupta <shucon01@gmail.com>
Date:   Mon Oct 12 12:44:18 2020 +0530

    Conditional axisOrder

    Signed-off-by: Saksham Gupta <shucon01@gmail.com>

commit 606af7e
Author: Saksham Gupta <shucon01@gmail.com>
Date:   Fri Oct 9 00:45:42 2020 +0530

    Fix Latitude and Longitudes swap
    Fixes: phpmyadmin#16326
@williamdes williamdes added this to the 5.0.4 milestone Oct 12, 2020
@williamdes williamdes self-assigned this Oct 12, 2020
williamdes added a commit that referenced this issue Oct 13, 2020
…es in edit mode

Fixes: #16326
Pull-request: #16391

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Oct 13, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Needs triage to Closed Oct 13, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
issues
  
Closed
Development

Successfully merging a pull request may close this issue.

2 participants