Is the result of ST_Union defined?Problem with shortest distance calculation in PostGISTo what extent is...

Why did Shae (falsely) implicate Sansa?

Badly designed reimbursement form. What does that say about the company?

Why is Shelob considered evil?

Negotiating 1-year delay to my Assistant Professor Offer

What have we got?

Coworker is trying to get me to sign his petition to run for office. How to decline politely?

Is layered encryption more secure than long passwords?

Should corporate security training be tailored based on a users' job role?

Father gets chickenpox, but doesn't infect his two children. How is this possible?

Smooth Density Histogram with probability areas

Taking an academic pseudonym?

How can I portray body horror and still be sensitive to people with disabilities?

Someone wants me to use my credit card at a card-only gas/petrol pump in return for cash

Tikz - highlight text in an image

Suggestions on how to improve logo

Pictures from Mars

Identical projects by students at two different colleges: still plagiarism?

Do error bars on probabilities have any meaning?

What happens when the last remaining players refuse to kill each other?

Why is Bernie Sanders maximum accepted donation on actblue $5600?

How to use the viewer node?

Copy the content of an environment

Sing Baby Shark

Why does the current not skip resistors R3 and R5 when R6 and R4 have no resistance?



Is the result of ST_Union defined?


Problem with shortest distance calculation in PostGISTo what extent is MariaDB Java client a perfect replacement for MySQL JDBC (Connector/J)?MySQL security group view permission queryMySQL lost connection during query after specific recordOpen source & cheap 'data at rest' encryption solutionsWhy I can't calculate the distance between a fixed point and a geometry field of a MySql table using this distance function?SOLUTION - OOM Killer was killing mariadb every hour or somysqldump to a hostname which is proxy/router (not MySQL server)Improve underestimated CTE estimates or replace CTE scan in Postgres 10.1Storing point data for linestring in MySQL













0















With MariaDB 10.1, I get a simplified LINESTRING when I provide two lines can be joined.



SELECT ST_AsText(geom)
FROM (
SELECT ST_Union(
LineString(Point(0,0),Point(1,1)),
LineString(Point(1,1),Point(2,2))
) AS geom
) AS t;
+---------------------+
| ST_AsText(geom) |
+---------------------+
| LINESTRING(0 0,2 2) |
+---------------------+


But with PostGIS I get a MULTILINESTRING



SELECT ST_AsText(geom)
FROM (
SELECT ST_Union(
ST_MakeLine(ST_Point(0,0),ST_Point(1,1)),
ST_MakeLine(ST_Point(1,1),ST_Point(2,2))
) AS geom
) AS t;
st_astext
--------------------------------------
MULTILINESTRING((0 0,1 1),(1 1,2 2))


It's important that the return type in MySQL seems to be dependent on the geometeries, change the second line to ST_MakeLine(ST_Point(2,2),ST_Point(3,3)) and you'll get the same thing in both.



SELECT ST_AsText(geom)
FROM ST_Union(
ST_MakeLine(ST_Point(0,0),ST_Point(1,1)),
ST_MakeLine(ST_Point(2,2),ST_Point(3,3))
) AS geom
) AS t;
+--------------------------------------+
| ST_AsText(geom) |
+--------------------------------------+
| MULTILINESTRING((0 0,1 1),(2 2,3 3)) |
+--------------------------------------+

st_astext
--------------------------------------
MULTILINESTRING((0 0,1 1),(2 2,3 3))


With MySQL on ST_Union of LineString(Point(0,0),Point(1,1)) and LineString(Point(1,1),Point(1,0)) you actually get back LINESTRING(0 0,1 1,1 0)










share|improve this question





























    0















    With MariaDB 10.1, I get a simplified LINESTRING when I provide two lines can be joined.



    SELECT ST_AsText(geom)
    FROM (
    SELECT ST_Union(
    LineString(Point(0,0),Point(1,1)),
    LineString(Point(1,1),Point(2,2))
    ) AS geom
    ) AS t;
    +---------------------+
    | ST_AsText(geom) |
    +---------------------+
    | LINESTRING(0 0,2 2) |
    +---------------------+


    But with PostGIS I get a MULTILINESTRING



    SELECT ST_AsText(geom)
    FROM (
    SELECT ST_Union(
    ST_MakeLine(ST_Point(0,0),ST_Point(1,1)),
    ST_MakeLine(ST_Point(1,1),ST_Point(2,2))
    ) AS geom
    ) AS t;
    st_astext
    --------------------------------------
    MULTILINESTRING((0 0,1 1),(1 1,2 2))


    It's important that the return type in MySQL seems to be dependent on the geometeries, change the second line to ST_MakeLine(ST_Point(2,2),ST_Point(3,3)) and you'll get the same thing in both.



    SELECT ST_AsText(geom)
    FROM ST_Union(
    ST_MakeLine(ST_Point(0,0),ST_Point(1,1)),
    ST_MakeLine(ST_Point(2,2),ST_Point(3,3))
    ) AS geom
    ) AS t;
    +--------------------------------------+
    | ST_AsText(geom) |
    +--------------------------------------+
    | MULTILINESTRING((0 0,1 1),(2 2,3 3)) |
    +--------------------------------------+

    st_astext
    --------------------------------------
    MULTILINESTRING((0 0,1 1),(2 2,3 3))


    With MySQL on ST_Union of LineString(Point(0,0),Point(1,1)) and LineString(Point(1,1),Point(1,0)) you actually get back LINESTRING(0 0,1 1,1 0)










    share|improve this question



























      0












      0








      0








      With MariaDB 10.1, I get a simplified LINESTRING when I provide two lines can be joined.



      SELECT ST_AsText(geom)
      FROM (
      SELECT ST_Union(
      LineString(Point(0,0),Point(1,1)),
      LineString(Point(1,1),Point(2,2))
      ) AS geom
      ) AS t;
      +---------------------+
      | ST_AsText(geom) |
      +---------------------+
      | LINESTRING(0 0,2 2) |
      +---------------------+


      But with PostGIS I get a MULTILINESTRING



      SELECT ST_AsText(geom)
      FROM (
      SELECT ST_Union(
      ST_MakeLine(ST_Point(0,0),ST_Point(1,1)),
      ST_MakeLine(ST_Point(1,1),ST_Point(2,2))
      ) AS geom
      ) AS t;
      st_astext
      --------------------------------------
      MULTILINESTRING((0 0,1 1),(1 1,2 2))


      It's important that the return type in MySQL seems to be dependent on the geometeries, change the second line to ST_MakeLine(ST_Point(2,2),ST_Point(3,3)) and you'll get the same thing in both.



      SELECT ST_AsText(geom)
      FROM ST_Union(
      ST_MakeLine(ST_Point(0,0),ST_Point(1,1)),
      ST_MakeLine(ST_Point(2,2),ST_Point(3,3))
      ) AS geom
      ) AS t;
      +--------------------------------------+
      | ST_AsText(geom) |
      +--------------------------------------+
      | MULTILINESTRING((0 0,1 1),(2 2,3 3)) |
      +--------------------------------------+

      st_astext
      --------------------------------------
      MULTILINESTRING((0 0,1 1),(2 2,3 3))


      With MySQL on ST_Union of LineString(Point(0,0),Point(1,1)) and LineString(Point(1,1),Point(1,0)) you actually get back LINESTRING(0 0,1 1,1 0)










      share|improve this question
















      With MariaDB 10.1, I get a simplified LINESTRING when I provide two lines can be joined.



      SELECT ST_AsText(geom)
      FROM (
      SELECT ST_Union(
      LineString(Point(0,0),Point(1,1)),
      LineString(Point(1,1),Point(2,2))
      ) AS geom
      ) AS t;
      +---------------------+
      | ST_AsText(geom) |
      +---------------------+
      | LINESTRING(0 0,2 2) |
      +---------------------+


      But with PostGIS I get a MULTILINESTRING



      SELECT ST_AsText(geom)
      FROM (
      SELECT ST_Union(
      ST_MakeLine(ST_Point(0,0),ST_Point(1,1)),
      ST_MakeLine(ST_Point(1,1),ST_Point(2,2))
      ) AS geom
      ) AS t;
      st_astext
      --------------------------------------
      MULTILINESTRING((0 0,1 1),(1 1,2 2))


      It's important that the return type in MySQL seems to be dependent on the geometeries, change the second line to ST_MakeLine(ST_Point(2,2),ST_Point(3,3)) and you'll get the same thing in both.



      SELECT ST_AsText(geom)
      FROM ST_Union(
      ST_MakeLine(ST_Point(0,0),ST_Point(1,1)),
      ST_MakeLine(ST_Point(2,2),ST_Point(3,3))
      ) AS geom
      ) AS t;
      +--------------------------------------+
      | ST_AsText(geom) |
      +--------------------------------------+
      | MULTILINESTRING((0 0,1 1),(2 2,3 3)) |
      +--------------------------------------+

      st_astext
      --------------------------------------
      MULTILINESTRING((0 0,1 1),(2 2,3 3))


      With MySQL on ST_Union of LineString(Point(0,0),Point(1,1)) and LineString(Point(1,1),Point(1,0)) you actually get back LINESTRING(0 0,1 1,1 0)







      mysql mariadb postgis






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 52 mins ago







      Evan Carroll

















      asked 1 hour ago









      Evan CarrollEvan Carroll

      32.4k970220




      32.4k970220






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230196%2fis-the-result-of-st-union-defined%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230196%2fis-the-result-of-st-union-defined%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Anexo:Material bélico de la Fuerza Aérea de Chile Índice Aeronaves Defensa...

          Always On Availability groups resolving state after failover - Remote harden of transaction...

          update json value to null Announcing the arrival of Valued Associate #679: Cesar Manara ...