Project-OSRM / node-osrm

DEPRECATED Part of osrm-backend since 5.7. NodeJS bindings for OSRM
BSD 2-Clause "Simplified" License
141 stars 48 forks source link

How to calculate state miles. #236

Closed mdhanju closed 8 years ago

mdhanju commented 8 years ago

Any idea how to calculate state miles. For example i travel from Los Angles to Dellas TX, need miles travelled in each state, CA, AZ, NM, and TZ.

daniel-j-h commented 8 years ago

Sorry for the late response! You can do your route request with node-osrm but you have to do the post-processing yourself: one idea would be to check the coordinates for each step in the response against state polygons doing simple point-in-polygon tests.

Closing this as not actionable on our side.