<div dir="ltr"> - Sorry for the extremely delayed response, but I just wanted to say I appreciated the feedback, and thank you for your advice Nicolas! - It turned out I had missed a call available in the API of a commercial mileage engine the company I work for was already using and licensed for, so (unfortunately?) I didn't get a chance to pursue this with graphhopper.  - I was looking to overlay a route over an openstreetmap (which this looked to be a great solution for!), with in-state distances, but had missed the commercial product actually had a .dll method available to pull the route shape points to be able to render it elsewhere, which took care of the whole issue and made a quite easy solution with things I had previously built.   --  I hope to have a reason to return to the graphhopper project thought, after having it up and running it looks pretty awesome, especially in the speed department.<div>
<br></div><div>Thanks again,</div><div>  ~Tim    <div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 15, 2013 at 1:52 AM, Nicolas Gillet <span dir="ltr"><<a href="mailto:nicolas.gillet@market-ip.com" target="_blank">nicolas.gillet@market-ip.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="FR-BE" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Tim,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I basically see 2 ways of doing this<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The first consist of catching provinces’ border nodes while computing the path’s distance. Iterating over the path’s nodes and split the path each
 time the encountered node is a border node.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">This would require some modification in OSM import process to ensure that there is always a node in the border. You’d also have to decorate node
 storage to store the “isBorder” info.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The second would be to use graphhopper as is and then use a library like GeoTools to split the road using the provinces’ geometries as a “cookie
 cutter”.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The first one might be more efficient, the second easier to implement.<u></u><u></u></span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Nicolas GILLET<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></b></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Market-IP –</span></b><i><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">
</span></i><i><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#404040">Creating Mobile Intelligence</span></i><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Phone : <a href="tel:%2B32%2081%2033%2011%2011" value="+3281331111" target="_blank">+32 81 33 11 11</a>
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Fax : <a href="tel:%2B32%2081%2033%2011%2010" value="+3281331110" target="_blank">+32 81 33 11 10</a><u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><a href="http://www.market-ip.com/" target="_blank"><span style="color:blue">www.market-ip.com</span></a> –
<a href="http://www.telefleet.com/" target="_blank"><span style="color:blue">www.telefleet.com</span></a> –
<a href="http://www.geoplanning.net/" target="_blank"><span style="color:blue">www.geoplanning.net</span></a> –
<a href="http://www.drivexpert.net/" target="_blank"><span style="color:blue">www.drivexpert.net</span></a>
<u></u><u></u></span></p>
<p class="MsoNormal"><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d;text-decoration:none"><img border="0" width="30" height="25" src="cid:image001.png@01CEC982.C0203230" alt="Description : cid:image003.png@01CD5521.849F3340"></span></a><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="FR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">De :</span></b><span lang="FR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Tim g [mailto:<a href="mailto:tgalla0102@gmail.com" target="_blank">tgalla0102@gmail.com</a>]
<br>
<b>Envoyé :</b> mardi 15 octobre 2013 00:38<br>
<b>À :</b> <a href="mailto:graphhopper@openstreetmap.org" target="_blank">graphhopper@openstreetmap.org</a><br>
<b>Objet :</b> [GraphHopper] State and Province crossings<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Good afternoon all,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> - I came across this amazing project today, and was able to get the source up and running pretty quickly.   One of the needs of the project I am working on is to be able to break out mileages of a route by state/province.  I am quite comfortable
 in Java, but not as much with routing and the 'guts' of OSM data yet.  <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> - Would there happen to be anything in the works to possibly be able to do this, and if not any thoughts on if possible, and the size of the undertaking to be able to do so?     If the existing framework would reasonably support doing
 this, I'd appreciate any pointers in the right direction.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you all for your time,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ~Tim<u></u><u></u></p>
</div>
</div>
</div></div></div>
</div>

<br>_______________________________________________<br>
GraphHopper mailing list<br>
<a href="mailto:GraphHopper@openstreetmap.org">GraphHopper@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/graphhopper" target="_blank">https://lists.openstreetmap.org/listinfo/graphhopper</a><br>
<br></blockquote></div><br></div></div></div>