Route creation with specific length and elevation changeHow do I get a route between two points using...

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

Coworker asking me to not bring cakes due to self control issue. What should I do?

Problems with position of tikzpictures in beamer

What is an explicit bijection in combinatorics?

Including proofs of known theorems in master's thesis

How do I avoid the "chosen hero" feeling?

My job requires me to shuck oysters

Could a civilization in medieval fantasy world sustain itself by occupying important trade hubs and taxing trade?

Why do single electrical receptacles exist?

Why don't you get burned by the wood benches in a sauna?

Taking an academic pseudonym?

Is there redundancy between a US Passport Card and an Enhanced Driver's License?

How can I keep my gold safe from other PCs?

Was the Spartan by Mimic Systems a real product?

Is the tritone (A4 / d5) still banned in Roman Catholic music?

Is the percentage symbol a constant?

What does "south of due west" mean?

Buying a "Used" Router

Is the Maximum Use License for Everybody (MULE) a FOSS license?

How many copper coins fit inside a cubic foot?

Minimum Viable Product for RTS game?

Do the speed limit reductions due to pollution also apply to electric cars in France?

1990s-2000s horror alien movie with slugs infecting people through the mouth

How do I purchase a drop bar bike that will be converted to flat bar?



Route creation with specific length and elevation change


How do I get a route between two points using PgRouting with TIGER2010 DataMySQL Query to fetch all cities and POI's near the routeHow to get route plan with certain distance with pgRouting?How to intersect shapefiles with elevation models?Finding points along a pathHow to calculate distances between several points along network?Calculating distance between two sets of Decimal Degree coordinates?Get km route between two points with lat / lngUsing GDAL/C++ to calculate distance in metersObtain elevation from a request lat,long with a map .tif













0















I'm currently working on a project for my computer science study. The goal is to make a service that allows the user to enter a distance and elevation change which will then result in a random route (either with the starting point being the endpoint at the same time or not).



Our "stakeholder" wants the routes to always be different so it doesn't get boring while he's jogging / biking haha.



My current progress:




  • I wrote a small library in golang to calculate the elevation at a certain gps coordinate (with SRTM data). -> It's not relevant right now, just FYI :)

  • I loaded the OSM file of switzerland into a local postgres DB, which is working. (I'm using the SRID 21781 for switzerland).
    --> I was able to calculate a distance between two points but it's just a direct line without respecting streets etc.


My idea is to make some kind of a grid with a distance of 20 - 50 meters between all the points (looking like a chess board haha). Then I calculate the distance between those points by choosing different lines (I'm thinking of the table planet_osm_line). Like that I can slowly build up a route. Since the elevation change in those 20-50 meters isn't rapidly growing, I could take the average elevation between A and B to get an overall elevation difference.



I saw that there is a tool called pgRouting. But as far as I've seen, it calculates a route between two points with Dijkstras algorithm (which wouldn't help me get a route with length x, but the shortest one).



I'm not sure if this is a good approach and how I should actually realize it with the postgis tool.



Do you guys have some tips that can guide me in the right direction? :)



Best regards,
Luke










share|improve this question







New contributor




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

























    0















    I'm currently working on a project for my computer science study. The goal is to make a service that allows the user to enter a distance and elevation change which will then result in a random route (either with the starting point being the endpoint at the same time or not).



    Our "stakeholder" wants the routes to always be different so it doesn't get boring while he's jogging / biking haha.



    My current progress:




    • I wrote a small library in golang to calculate the elevation at a certain gps coordinate (with SRTM data). -> It's not relevant right now, just FYI :)

    • I loaded the OSM file of switzerland into a local postgres DB, which is working. (I'm using the SRID 21781 for switzerland).
      --> I was able to calculate a distance between two points but it's just a direct line without respecting streets etc.


    My idea is to make some kind of a grid with a distance of 20 - 50 meters between all the points (looking like a chess board haha). Then I calculate the distance between those points by choosing different lines (I'm thinking of the table planet_osm_line). Like that I can slowly build up a route. Since the elevation change in those 20-50 meters isn't rapidly growing, I could take the average elevation between A and B to get an overall elevation difference.



    I saw that there is a tool called pgRouting. But as far as I've seen, it calculates a route between two points with Dijkstras algorithm (which wouldn't help me get a route with length x, but the shortest one).



    I'm not sure if this is a good approach and how I should actually realize it with the postgis tool.



    Do you guys have some tips that can guide me in the right direction? :)



    Best regards,
    Luke










    share|improve this question







    New contributor




    Lukas Zbinden 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'm currently working on a project for my computer science study. The goal is to make a service that allows the user to enter a distance and elevation change which will then result in a random route (either with the starting point being the endpoint at the same time or not).



      Our "stakeholder" wants the routes to always be different so it doesn't get boring while he's jogging / biking haha.



      My current progress:




      • I wrote a small library in golang to calculate the elevation at a certain gps coordinate (with SRTM data). -> It's not relevant right now, just FYI :)

      • I loaded the OSM file of switzerland into a local postgres DB, which is working. (I'm using the SRID 21781 for switzerland).
        --> I was able to calculate a distance between two points but it's just a direct line without respecting streets etc.


      My idea is to make some kind of a grid with a distance of 20 - 50 meters between all the points (looking like a chess board haha). Then I calculate the distance between those points by choosing different lines (I'm thinking of the table planet_osm_line). Like that I can slowly build up a route. Since the elevation change in those 20-50 meters isn't rapidly growing, I could take the average elevation between A and B to get an overall elevation difference.



      I saw that there is a tool called pgRouting. But as far as I've seen, it calculates a route between two points with Dijkstras algorithm (which wouldn't help me get a route with length x, but the shortest one).



      I'm not sure if this is a good approach and how I should actually realize it with the postgis tool.



      Do you guys have some tips that can guide me in the right direction? :)



      Best regards,
      Luke










      share|improve this question







      New contributor




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












      I'm currently working on a project for my computer science study. The goal is to make a service that allows the user to enter a distance and elevation change which will then result in a random route (either with the starting point being the endpoint at the same time or not).



      Our "stakeholder" wants the routes to always be different so it doesn't get boring while he's jogging / biking haha.



      My current progress:




      • I wrote a small library in golang to calculate the elevation at a certain gps coordinate (with SRTM data). -> It's not relevant right now, just FYI :)

      • I loaded the OSM file of switzerland into a local postgres DB, which is working. (I'm using the SRID 21781 for switzerland).
        --> I was able to calculate a distance between two points but it's just a direct line without respecting streets etc.


      My idea is to make some kind of a grid with a distance of 20 - 50 meters between all the points (looking like a chess board haha). Then I calculate the distance between those points by choosing different lines (I'm thinking of the table planet_osm_line). Like that I can slowly build up a route. Since the elevation change in those 20-50 meters isn't rapidly growing, I could take the average elevation between A and B to get an overall elevation difference.



      I saw that there is a tool called pgRouting. But as far as I've seen, it calculates a route between two points with Dijkstras algorithm (which wouldn't help me get a route with length x, but the shortest one).



      I'm not sure if this is a good approach and how I should actually realize it with the postgis tool.



      Do you guys have some tips that can guide me in the right direction? :)



      Best regards,
      Luke







      postgis distance pgrouting elevation route






      share|improve this question







      New contributor




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











      share|improve this question







      New contributor




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









      share|improve this question




      share|improve this question






      New contributor




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









      asked 11 mins ago









      Lukas ZbindenLukas Zbinden

      1




      1




      New contributor




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





      New contributor





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






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


          }
          });






          Lukas Zbinden 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%2f313319%2froute-creation-with-specific-length-and-elevation-change%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








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










          draft saved

          draft discarded


















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













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












          Lukas Zbinden 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%2f313319%2froute-creation-with-specific-length-and-elevation-change%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 Содержание Параметры шины | Стандартизация |...