<html><head></head><body><div class="ydp71f5b5cdyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
<div dir="ltr" data-setdir="false">Hi Mike,</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I am glad this helped you.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I am going to punt on this since a similar question about how to do routes in QGIS was asked recently, and I think it received some answers, you should be able to find it on the QGIS-user Nabble archive. </div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">That said, my initial thought is that instead of using Google you might want to do your routing on websites or API's that are based directly on OSM data, for example Graphhopper or Openrouteservice.org that will allow you to export routes as GPX. You can then use Douglas Peuker to simplify. If you are looking for a more automated way of doing this you may want to dig into the API's for those sites. </div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">-Thayer</div><div dir="ltr" data-setdir="false"><br></div><div><br></div>
</div><div id="ydpfe29f2c6yahoo_quoted_4274972421" class="ydpfe29f2c6yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Thursday, October 22, 2020, 08:08:09 AM EDT, Mike Flannigan <mikeflan@att.net> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div dir="ltr"><br clear="none">Thanks for this procedure Thayer.<br clear="none">I use Overpass Turbo to plot tracks along roads. It is somewhat<br clear="none">of a complicated process, but it works. Perhaps I should be<br clear="none">using QGIS to do this instead.<br clear="none"><br clear="none">But since I currently reply on the Overpass Turbo website, I am<br clear="none">looking for an alternate website that does the same thing. I want<br clear="none">to prepare for the day when Overpass Turbo disappears (or moves).<br clear="none"><br clear="none">So this email is a 2 part question.<br clear="none"><br clear="none">1) Are there any other websites that do what the Overpass Turbo website <br clear="none">does?<br clear="none"><br clear="none">2) Do you have any suggestions on a better way to get a track plot along<br clear="none">roads, when you feed the program just a few vertexes along the road route?<br clear="none"><br clear="none">My convoluted procedure to get tracks along roads is shown below.<br clear="none"><br clear="none"><br clear="none">Mike<br clear="none"><br clear="none"><br clear="none"><br clear="none">THE New Procedure for Tracks is:<br clear="none"><br clear="none">Create a text file with DD lat/longs that looks like this:<br clear="none">38.891953, -94.714428<br clear="none">39.961945, -95.788242<br clear="none">42.263043, -96.481528<br clear="none">42.874940, -97.140297<br clear="none">43.095141, -98.332987<br clear="none"><br clear="none">This is generally created from taking each point from Google Maps.<br clear="none"><br clear="none"><br clear="none">Then run googmaptrack.pl to create a google maps URL like this:<br clear="none"><a shape="rect" href="https://www.google.com/maps/dir/38.891953,-94.714428/39.961945,-95.788242/42.263043,-96.481528/42.874940,-97.140297/43.095141,-98.332987" rel="nofollow" target="_blank">https://www.google.com/maps/dir/38.891953,-94.714428/39.961945,-95.788242/42.263043,-96.481528/42.874940,-97.140297/43.095141,-98.332987</a><br clear="none"><br clear="none"><br clear="none">Paste that URL into a browser and make sure it is the correct route.<br clear="none">If not, add more intermediary points to correct the route.<br clear="none"><br clear="none"><br clear="none">Then run trackosrm.pl to create a bunch of terminal commands that<br clear="none">curl an OSRM URL like this:<br clear="none">curl <br clear="none">'<a shape="rect" href="http://router.project-osrm.org/route/v1/driving/-104.062500,46.498392;-94.714428,38.891953?alternatives=false&annotations=nodes' " rel="nofollow" target="_blank">http://router.project-osrm.org/route/v1/driving/-104.062500,46.498392;-94.714428,38.891953?alternatives=false&annotations=nodes' </a><br clear="none"> >/home/mike/Documents/copy5/procout01.txt<br clear="none"><br clear="none">Paste the whole string of terminal commands into a terminal to create<br clear="none">all the procoutXX.txt files.<br clear="none"><br clear="none"><br clear="none">Then use trackosrm2.pl to process those procoutXX.txt files<br clear="none">to extract all of the node numbers to nodes.txt. It will<br clear="none">create an output that looks like this:<br clear="none"><br clear="none">[out:json];<br clear="none">(<br clear="none"> node(77927832);<br clear="none"> node(77927830);<br clear="none"> node(77927828);<br clear="none"> node(77927826);<br clear="none">);<br clear="none">(._;>;);<br clear="none">out;<br clear="none"><br clear="none">YOU NEED TO ADD THOSE FIRST 2 LINES AND LAST 3 LINES.<br clear="none"><br clear="none"><br clear="none">Then paste all those nodes and to this website:<br clear="none"><a shape="rect" href="http://overpass-turbo.eu/" rel="nofollow" target="_blank">http://overpass-turbo.eu/</a><br clear="none"><br clear="none">Hit the Run button at the upper left.<br clear="none"><br clear="none">Then hit the "Data" tab at the upper right and copy and paste the data <br clear="none">supplied<br clear="none">into a file like latlong.txt.<br clear="none"><br clear="none">Use garminfile.pl to extract the lat/longs to TopoUSA format.<br clear="none"><br clear="none"><br clear="none">Unfortunately, curl does not keep the items in order. So we need<br clear="none">to change the trackosrm.pl 'out' file above that looks like this:<br clear="none">curl <br clear="none">'<a shape="rect" href="http://router.project-osrm.org/route/v1/driving/-118.799440,37.663330;-118.592720,37.671850?alternatives=false&annotations=nodes' " rel="nofollow" target="_blank">http://router.project-osrm.org/route/v1/driving/-118.799440,37.663330;-118.592720,37.671850?alternatives=false&annotations=nodes' </a><br clear="none"> >/home/mike/Documents/copy5/procout01.txt<br clear="none">curl <br clear="none">'<a shape="rect" href="http://router.project-osrm.org/route/v1/driving/-118.592720,37.671850;-116.855740,38.125510?alternatives=false&annotations=nodes' " rel="nofollow" target="_blank">http://router.project-osrm.org/route/v1/driving/-118.592720,37.671850;-116.855740,38.125510?alternatives=false&annotations=nodes' </a><br clear="none"> >/home/mike/Documents/copy5/procout02.txt<br clear="none"><br clear="none">and change it to this:<br clear="none"><br clear="none">firefox <br clear="none">'<a shape="rect" href="http://router.project-osrm.org/route/v1/driving/-118.799440,37.663330;-118.592720,37.671850?alternatives=false&annotations=nodes'" rel="nofollow" target="_blank">http://router.project-osrm.org/route/v1/driving/-118.799440,37.663330;-118.592720,37.671850?alternatives=false&annotations=nodes'</a><br clear="none">firefox <br clear="none">'<a shape="rect" href="http://router.project-osrm.org/route/v1/driving/-118.592720,37.671850;-116.855740,38.125510?alternatives=false&annotations=nodes'" rel="nofollow" target="_blank">http://router.project-osrm.org/route/v1/driving/-118.592720,37.671850;-116.855740,38.125510?alternatives=false&annotations=nodes'</a><br clear="none"><br clear="none">by using this:<br clear="none">find /home/mike/Documents/copy3 -maxdepth 1 -type f -iname <br clear="none">"track2_out.txt" -exec grep -il -Z "driving" {} \; | xargs -0 perl <br clear="none">-i.bak -pnwe 's/curl\s(.*) >.*/firefox $1/g'<br clear="none"><br clear="none"><br clear="none">Then copy each firefox command into the terminal and copy the web page <br clear="none">output<br clear="none">into an 'order.txt' file, remove the beginning and ending lines, so we only<br clear="none">have the node lines. Then do a search and replace - search for <br clear="none">"^\d+\s+" and<br clear="none">replace with nothing.<br clear="none"><br clear="none">So order.txt has nothing but node numbers (in order) in it.<br clear="none"><br clear="none">Then use trackorder.pl to reorder all the procout.txt files created above.<br clear="none"><br clear="none"><br clear="none">Then use trackreduce.pl to reduce the number of points with the Douglas <br clear="none">- Peucker algorithm.<br clear="none"><br clear="none"><br clear="none">Then use geojson.pl to create a geojson file to use in QGIS to see what <br clear="none">the track looks like.<br clear="none"><br clear="none"><br clear="none"><br clear="none"><br clear="none">On 10/20/20 5:37 PM, <a shape="rect" href="mailto:qgis-user-request@lists.osgeo.org" rel="nofollow" target="_blank">qgis-user-request@lists.osgeo.org</a> wrote:<div class="ydpfe29f2c6yqt2738487225" id="ydpfe29f2c6yqtfd67823"><br clear="none">> Hi Wanda,<br clear="none">> There are ways of filtering Open Street Map data before you download it, so the processing is done on the server not on your computer, so that should help you avoid crashes in QGIS.<br clear="none">> One way to do this is with Overpass Turbo (<a shape="rect" href="https://overpass-turbo.eu" rel="nofollow" target="_blank">https://overpass-turbo.eu</a>) to select all of the roads in the map view.<br clear="none">> Overpass Turbo<br clear="none">> 0) Close applications that you do not need, and open a web browser.1) Go to the Overpass Turbo website and use the search and zoom controls to adjust the map to your area of interest. 2) Then copy and paste the sample query into the text area to the left side of the map window. 3) Then click on the "Run" button at the top left.4) After it runs for a while it will probably say "Large Amounts of Data" and ask you if you want to continue, click "continue anyway". Rockford indeed is small and does not have this problem, but Grand Rapids for example gives 30 MB of data, 60 MB may cause an error.5) Click on Export (third button from the left at the top). 6) Then on the top line of the dialog click "download" from "download/copy as GeoJSON"7) Name the file and download it to somewhere that you will be able to find again (the default is export.geojson).8) Click "done"9) Close the web browser<br clear="none">> QGIS<br clear="none">> 10) In QGIS open the Data Source Manager and click on Vector (at the top click Layer then choose Data Source Manager from the menu) a) Under Source click on the three dots to the right of Vector Datasets b) browse to the export.geojson file and click Open. c) at the bottom right of the Data Source Manager-Vector window click on "Add" 11) This will bring up a dialog asking you which of the geometry layers to add. a) click on the one that says LineString at the right side under Geometry type. Then click OK.12) After a few seconds you should see the "export" layer appear in the Layers list and see the roads show up in the map. a) close the Data Source Manager window.<br clear="none">> Geojson layers are very slow in QGIS, so you should convert them to another format like ESRI Shapefile.<br clear="none">> 13) In the Layers panel right click on the "export" layer (the one with the line on the left side) a) from the menu hover over Export then click on Save Features As14) At the top of the "Save Vector Layer As..." dialog: a) change the format to "ESRI Shapefile" b) click on the three dots to the right of File Name i) name your file (e.g. grand_rapids.shp), choose a folder where to save it, and click "Save" c) at the bottom click OK. d) the grand_rapids layer will be added to the Layers panel, and the color of the roads on the map should change.15) Right click on the "export" layer. a) click Remove Layer i) click OK when asked: "Remove 1 Legend Entries?"16) Save the project.<br clear="none">> Label the roads.<br clear="none">> 17) Double click on the "grand_rapids" layer in the Layers panel.18) At the left of the Layer Properties window click on Labels a) at the top change No Labels to Single Labels i) just below Single Lables set the Value to "name" ii) at the bottom right click OK<br clear="none">> Now when you zoom in and out the labels will appear on the roads.<br clear="none">> -Thayer<br clear="none"><br clear="none"></div></div></div>
</div>
</div></body></html>