ST_Intersects returning incorrect result on routing problem?Generate source_id and target_ id for every...

How to explain what's wrong with this application of the chain rule?

Can I sign legal documents with a smiley face?

Count the occurrence of each unique word in the file

Store Credit Card Information in Password Manager?

Problem with TransformedDistribution

Does a 'pending' US visa application constitute a denial?

What should you do when eye contact makes your subordinate uncomfortable?

Biological Blimps: Propulsion

What does "Scientists rise up against statistical significance" mean? (Comment in Nature)

Pre-mixing cryogenic fuels and using only one fuel tank

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

Why is it that I can sometimes guess the next note?

Terse Method to Swap Lowest for Highest?

Is it possible to put a rectangle as background in the author section?

copy and scale one figure (wheel)

How do I color the graph in datavisualization?

Where does the bonus feat in the cleric starting package come from?

Why should universal income be universal?

What was the exact wording from Ivanhoe of this advice on how to free yourself from slavery?

Multiplicative persistence

What is Cash Advance APR?

On a tidally locked planet, would time be quantized?

Redundant comparison & "if" before assignment

Non-trope happy ending?



ST_Intersects returning incorrect result on routing problem?


Generate source_id and target_ id for every segment in a multilinestring geometry (PostGIS|PgRouting)How to find the Shortest Path between two coordinates points using pgrouting A-Star?given sets of vehicle passing on each edge, how to get most used vehicle to avoid transition?travel survey multi stop routing problemST_Intersects incorrectly returning false in PostGISProblem PostGIS Spatial Query ST_Contains ST_Disjoint ST_IntersectsRemoving pseudo nodes from PostGIS database using ST_ModEdgeHeal()?pgrouting to calculate distance using a chosen highway systemPostGIS do not want GeometryCollection in outputAdd a POI in pgrouting













1















I have a table that contains the shortest path between destinations for survey respondents on an osm2po created network. When calculating the shortest path result, I store the geometry in a column. Now, using the same osm2po network table and each shortest path geometry, I am trying to determine whether the shortest path crosses or intersects a highway. I created another table that just contains the osm2po network with clazz 11-16 and run an st_intersects(shortestpathgeom,highwaygeom) and get all false results. The shortest path geometry is multilinestring and the highway geometry is linestring, both are SRID 4326 and have been created from the same table. Why am I getting no intersections? Here is a picture of the shortest path in purple, highway in green, osm2po in red.



shortestpath(purple), highway(green), network(red)



here is my code where po_routing.route is the shortest path, po_highway.the_geom is highway only network, and obstacle is the intersection test.



update analysis.po_routing 
set obstacle = st_intersects(route,b.the_geom)
from analysis.po_highway as b;


I don't understand why this fundamental function is not working as expected.










share|improve this question





























    1















    I have a table that contains the shortest path between destinations for survey respondents on an osm2po created network. When calculating the shortest path result, I store the geometry in a column. Now, using the same osm2po network table and each shortest path geometry, I am trying to determine whether the shortest path crosses or intersects a highway. I created another table that just contains the osm2po network with clazz 11-16 and run an st_intersects(shortestpathgeom,highwaygeom) and get all false results. The shortest path geometry is multilinestring and the highway geometry is linestring, both are SRID 4326 and have been created from the same table. Why am I getting no intersections? Here is a picture of the shortest path in purple, highway in green, osm2po in red.



    shortestpath(purple), highway(green), network(red)



    here is my code where po_routing.route is the shortest path, po_highway.the_geom is highway only network, and obstacle is the intersection test.



    update analysis.po_routing 
    set obstacle = st_intersects(route,b.the_geom)
    from analysis.po_highway as b;


    I don't understand why this fundamental function is not working as expected.










    share|improve this question



























      1












      1








      1








      I have a table that contains the shortest path between destinations for survey respondents on an osm2po created network. When calculating the shortest path result, I store the geometry in a column. Now, using the same osm2po network table and each shortest path geometry, I am trying to determine whether the shortest path crosses or intersects a highway. I created another table that just contains the osm2po network with clazz 11-16 and run an st_intersects(shortestpathgeom,highwaygeom) and get all false results. The shortest path geometry is multilinestring and the highway geometry is linestring, both are SRID 4326 and have been created from the same table. Why am I getting no intersections? Here is a picture of the shortest path in purple, highway in green, osm2po in red.



      shortestpath(purple), highway(green), network(red)



      here is my code where po_routing.route is the shortest path, po_highway.the_geom is highway only network, and obstacle is the intersection test.



      update analysis.po_routing 
      set obstacle = st_intersects(route,b.the_geom)
      from analysis.po_highway as b;


      I don't understand why this fundamental function is not working as expected.










      share|improve this question
















      I have a table that contains the shortest path between destinations for survey respondents on an osm2po created network. When calculating the shortest path result, I store the geometry in a column. Now, using the same osm2po network table and each shortest path geometry, I am trying to determine whether the shortest path crosses or intersects a highway. I created another table that just contains the osm2po network with clazz 11-16 and run an st_intersects(shortestpathgeom,highwaygeom) and get all false results. The shortest path geometry is multilinestring and the highway geometry is linestring, both are SRID 4326 and have been created from the same table. Why am I getting no intersections? Here is a picture of the shortest path in purple, highway in green, osm2po in red.



      shortestpath(purple), highway(green), network(red)



      here is my code where po_routing.route is the shortest path, po_highway.the_geom is highway only network, and obstacle is the intersection test.



      update analysis.po_routing 
      set obstacle = st_intersects(route,b.the_geom)
      from analysis.po_highway as b;


      I don't understand why this fundamental function is not working as expected.







      postgis routing osm2po






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 18 mins ago









      PolyGeo

      53.7k1781244




      53.7k1781244










      asked Jul 15 '14 at 18:23









      EconGeoEconGeo

      13810




      13810






















          1 Answer
          1






          active

          oldest

          votes


















          1














          I seemed to have solved the problem by taking this approach:



          1) perform create table highwaysinglegeom as select st_union(the_geom) from analysis.po_highway



          2) perform the update query above using the single geometry highway table as the intersection layer rather than separate multilinestrings from my network.






          share|improve this answer























            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
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f107292%2fst-intersects-returning-incorrect-result-on-routing-problem%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            I seemed to have solved the problem by taking this approach:



            1) perform create table highwaysinglegeom as select st_union(the_geom) from analysis.po_highway



            2) perform the update query above using the single geometry highway table as the intersection layer rather than separate multilinestrings from my network.






            share|improve this answer




























              1














              I seemed to have solved the problem by taking this approach:



              1) perform create table highwaysinglegeom as select st_union(the_geom) from analysis.po_highway



              2) perform the update query above using the single geometry highway table as the intersection layer rather than separate multilinestrings from my network.






              share|improve this answer


























                1












                1








                1







                I seemed to have solved the problem by taking this approach:



                1) perform create table highwaysinglegeom as select st_union(the_geom) from analysis.po_highway



                2) perform the update query above using the single geometry highway table as the intersection layer rather than separate multilinestrings from my network.






                share|improve this answer













                I seemed to have solved the problem by taking this approach:



                1) perform create table highwaysinglegeom as select st_union(the_geom) from analysis.po_highway



                2) perform the update query above using the single geometry highway table as the intersection layer rather than separate multilinestrings from my network.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jul 15 '14 at 23:33









                EconGeoEconGeo

                13810




                13810






























                    draft saved

                    draft discarded




















































                    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%2f107292%2fst-intersects-returning-incorrect-result-on-routing-problem%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

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

                    Венесуэла на летних Олимпийских играх 2000 Содержание Состав...

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