In or out of isochrone

Dear community

I’ve been searching and thinking for a way to define if a given point on a map (coordinate) is in or out of an isochrone. At the moment, I’m getting my isochrone back as a polygon from the API.

But now, I can’t just compare the widest values of the polygon with my coordinate and if the coordinate values are smaller, I’m within (because the polygons are following nicely the roads and may be, a coordinate is having smaller longitude/latitude but still being sharp out of polygon). It would be already an approximative solution but not very precise.

Is there another API call I could make to find out, if my coordinate is within the response of the isochrone API (basically the polygon)?

Thanks a lot
Axylo

Hey,

no, this is not something the openrouteservice API would provide.
Most programming languages have libraries that provide this functionality. For QGIS there’s Select by location that has a contains operator.

The keyword to search for here is point in polygon or contains.

Best regards

1 Like

Hi Jakob

Cool, thank you for the hint. I wasn’t thinking into this direction - but yes, that’s obviously a very good approach. I’m coding a PHP solution. After looking around, I found this: Detect Geo Coordinates within a Polygon in PHP - Stack Overflow

I’m going to try it out and let the community know.

Regards
Axylo

1 Like

Indeed, I can only recommend the mentioned Stack Overflow post: Detect Geo Coordinates within a Polygon in PHP - Stack Overflow

Solved my requirement with this function there.

1 Like