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

What happens if you declare more than $10,000 at the US border?

Run a command that requires sudo after a time has passed

Why don't hotels offer (at least) 1 kitchen bookable by any guest?

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

Suggestions on how to improve logo

How to play song that contains one guitar when we have two guitarists (or more)?

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

Would Refreshing a Sandbox Wipe Out Certain Metadata?

Who, if anyone, was the first astronaut to return to earth in a different vessel?

For US ESTA, should I mention a visa denial from before I got UK citizenship?

How bad is a Computer Science course that doesn't teach Design Patterns?

How should I ship cards?

A dragon's soul trapped in a ring of mind shielding wants a new body; what magic could enable her to do so?

Does the phrase がんばする makes sense?

Why is it a problem for Freddie if the guys from Munich did what he wanted?

I hate taking lectures, can I still survive in academia?

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

Pictures from Mars

What have we got?

Can a rabbi conduct a marriage if the bride is already pregnant from the groom?

Sing Baby Shark

How can guns be countered by melee combat without raw-ability or exceptional explanations?

Can a planet be tidally unlocked?

Headless horseman claims new head



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 59 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 ...