Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-12915

ST_Centroid does not return the same result than MySQL

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1.14, 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
    • 10.0.31
    • GIS
    • CentOS 6.8

    Description

      Hi,

      The result of the ST_Centroid method does not seems correct.

      For the same request:

      SELECT AsText(ST_Centroid(ST_GeomFromText(' POLYGON((-122.8684759 49.2713048,-122.8804596 49.2712636,-122.880427 49.270522,-122.8932944 49.2704508,-122.893126 49.266063,-122.893084 49.2588789,-122.8927188 49.2458679,-122.892531 49.23803,-122.890696 49.236328,-122.8894146 49.2357782,-122.888219 49.236069,-122.886576 49.235914,-122.885352 49.235414,-122.8825066 49.2348937,-122.881285 49.234713,-122.8800524 49.2336459,-122.87881 49.23341,-122.877351 49.232865,-122.8763438 49.2318128,-122.875165 49.231153,-122.8750964 49.2305225,-122.876444 49.229864,-122.876627 49.2289017,-122.8764138 49.2282525,-122.8763938 49.2251511,-122.8755999 49.2253018,-122.8731537 49.2253684,-122.8727568 49.2453868,-122.8727889 49.245848,-122.8694309 49.2487784,-122.8690339 49.2493276,-122.868712 49.263537,-122.8684759 49.2713048)) ')))
      

      I get the following results:

      • On MySQL v5.7.14: POINT(-122.88103164136591 49.25294096399097)
      • On MariaDB v10.1.14: POINT(-122.88026060000001 49.24220679375)

      The MySQL result seems to be the good one.

      You can find attached a screenshot of the concrete case, as displayed in my application.

      Sorry if the bug has been already opened, I didn't found any issue about this subject.

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            Paul-DS Paul David-Sivelle
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.