Intersections in linestrings using Postgis Planned maintenance scheduled April 17/18, 2019 at...

What's the meaning of 間時肆拾貳 at a car parking sign

Denied boarding although I have proper visa and documentation. To whom should I make a complaint?

Why didn't this character "real die" when they blew their stack out in Altered Carbon?

ListPlot join points by nearest neighbor rather than order

Using et al. for a last / senior author rather than for a first author

Why did the IBM 650 use bi-quinary?

In predicate logic, does existential quantification (∃) include universal quantification (∀), i.e. can 'some' imply 'all'?

Coloring maths inside a tcolorbox

Output the ŋarâþ crîþ alphabet song without using (m)any letters

If a contract sometimes uses the wrong name, is it still valid?

2001: A Space Odyssey's use of the song "Daisy Bell" (Bicycle Built for Two); life imitates art or vice-versa?

How to find out what spells would be useless to a blind NPC spellcaster?

Why am I getting the error "non-boolean type specified in a context where a condition is expected" for this request?

When do you get frequent flier miles - when you buy, or when you fly?

How to align text above triangle figure

What to do with chalk when deepwater soloing?

How do I stop a creek from eroding my steep embankment?

What is the logic behind the Maharil's explanation of why we don't say שעשה ניסים on Pesach?

Why light coming from distant stars is not discreet?

Do I really need recursive chmod to restrict access to a folder?

Why is my conclusion inconsistent with the van't Hoff equation?

Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?

Identifying polygons that intersect with another layer using QGIS?

Why aren't air breathing engines used as small first stages



Intersections in linestrings using Postgis



Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Identifying Intersections of Geology using PostGISHow to select the cross streets in postgis spatial table?Create a “wide” table recording all overlaps between polygons in PostGISCutting linestrings with points?Improve performance of a PostGIS st_dwithin querypostgis update value from another table that intersectsST_Difference on linestrings and polygons slow and failsIdentify intersection points in linestrings using PostGISHow to use St_intersects with different geometry typeQuery Z at intersecting point locations from a MultiPolygonZ?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I need to get the intersections of streets and create a graph, so to get the intersections I use this select:



SELECT ST_geometrytype(geom), geom from (SELECT
a.gid, st_intersection(a.geom, b.geom) as geom
FROM
streets a
JOIN
streets b ON st_intersects(a.geom, b.geom)
and
a.gid!=b.gid
and
a.gid>b.gid) as foo


enter image description here



But this query returns different types of geometries, and some rows returns ST_GeometryColletion.



enter image description here



I tried to use this select:



SELECT ST_geometrytype(geom), geom from (SELECT
(ST_Dump(st_intersection(a.geom, b.geom))).geom as geom
FROM
streets a
JOIN
streets b ON st_intersects(a.geom, b.geom)
and
a.gid!=b.gid
and
a.gid>b.gid) as foo


enter image description here
When I used this query many linestrings were "broken" in short linestrings.



enter image description here



enter image description here



And now, I do not know how to join the short lines that are part of the same intersection. I need this to then create a graph, the linestrings will be my vertex.



enter image description here



Please, can anyone help me?



Thanks,









share







New contributor




Jessikdominfues is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



























    0















    I need to get the intersections of streets and create a graph, so to get the intersections I use this select:



    SELECT ST_geometrytype(geom), geom from (SELECT
    a.gid, st_intersection(a.geom, b.geom) as geom
    FROM
    streets a
    JOIN
    streets b ON st_intersects(a.geom, b.geom)
    and
    a.gid!=b.gid
    and
    a.gid>b.gid) as foo


    enter image description here



    But this query returns different types of geometries, and some rows returns ST_GeometryColletion.



    enter image description here



    I tried to use this select:



    SELECT ST_geometrytype(geom), geom from (SELECT
    (ST_Dump(st_intersection(a.geom, b.geom))).geom as geom
    FROM
    streets a
    JOIN
    streets b ON st_intersects(a.geom, b.geom)
    and
    a.gid!=b.gid
    and
    a.gid>b.gid) as foo


    enter image description here
    When I used this query many linestrings were "broken" in short linestrings.



    enter image description here



    enter image description here



    And now, I do not know how to join the short lines that are part of the same intersection. I need this to then create a graph, the linestrings will be my vertex.



    enter image description here



    Please, can anyone help me?



    Thanks,









    share







    New contributor




    Jessikdominfues is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I need to get the intersections of streets and create a graph, so to get the intersections I use this select:



      SELECT ST_geometrytype(geom), geom from (SELECT
      a.gid, st_intersection(a.geom, b.geom) as geom
      FROM
      streets a
      JOIN
      streets b ON st_intersects(a.geom, b.geom)
      and
      a.gid!=b.gid
      and
      a.gid>b.gid) as foo


      enter image description here



      But this query returns different types of geometries, and some rows returns ST_GeometryColletion.



      enter image description here



      I tried to use this select:



      SELECT ST_geometrytype(geom), geom from (SELECT
      (ST_Dump(st_intersection(a.geom, b.geom))).geom as geom
      FROM
      streets a
      JOIN
      streets b ON st_intersects(a.geom, b.geom)
      and
      a.gid!=b.gid
      and
      a.gid>b.gid) as foo


      enter image description here
      When I used this query many linestrings were "broken" in short linestrings.



      enter image description here



      enter image description here



      And now, I do not know how to join the short lines that are part of the same intersection. I need this to then create a graph, the linestrings will be my vertex.



      enter image description here



      Please, can anyone help me?



      Thanks,









      share







      New contributor




      Jessikdominfues is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I need to get the intersections of streets and create a graph, so to get the intersections I use this select:



      SELECT ST_geometrytype(geom), geom from (SELECT
      a.gid, st_intersection(a.geom, b.geom) as geom
      FROM
      streets a
      JOIN
      streets b ON st_intersects(a.geom, b.geom)
      and
      a.gid!=b.gid
      and
      a.gid>b.gid) as foo


      enter image description here



      But this query returns different types of geometries, and some rows returns ST_GeometryColletion.



      enter image description here



      I tried to use this select:



      SELECT ST_geometrytype(geom), geom from (SELECT
      (ST_Dump(st_intersection(a.geom, b.geom))).geom as geom
      FROM
      streets a
      JOIN
      streets b ON st_intersects(a.geom, b.geom)
      and
      a.gid!=b.gid
      and
      a.gid>b.gid) as foo


      enter image description here
      When I used this query many linestrings were "broken" in short linestrings.



      enter image description here



      enter image description here



      And now, I do not know how to join the short lines that are part of the same intersection. I need this to then create a graph, the linestrings will be my vertex.



      enter image description here



      Please, can anyone help me?



      Thanks,







      postgis





      share







      New contributor




      Jessikdominfues is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      Jessikdominfues is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      Jessikdominfues is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 5 mins ago









      JessikdominfuesJessikdominfues

      1




      1




      New contributor




      Jessikdominfues is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Jessikdominfues is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Jessikdominfues is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "79"
          };
          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
          });


          }
          });






          Jessikdominfues is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f319064%2fintersections-in-linestrings-using-postgis%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








          Jessikdominfues is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Jessikdominfues is a new contributor. Be nice, and check out our Code of Conduct.













          Jessikdominfues is a new contributor. Be nice, and check out our Code of Conduct.












          Jessikdominfues is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Geographic Information Systems 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%2fgis.stackexchange.com%2fquestions%2f319064%2fintersections-in-linestrings-using-postgis%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

          Щит и меч (фильм) Содержание Названия серий | Сюжет |...

          is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

          Meter-Bus Содержание Параметры шины | Стандартизация |...