Need an advice of framework for path on map validation

algorithm, geolocation, geospatial, java, perl

Solution

This is a Point in polygon

- Build a list of polygons from "One file defining edges of the two polygons (only the points that connect straight lines)"

- Apply point_in_polygon() (perl implementation, your favorite) for each "waypoints I had visited"

Problem

The problem I am facing is as follows: Given two polygons defining the borders of a maze and a path in between (see picture below), I would like to know when I crossed the borders of the maze. In respect to the inputs I have: - One file defining edges of the two polygons (only the points that connect straight lines) - One file with all waypoints I had visited, in the order of appearance I need to calculate a score for that path based on the amount of time spent in the restricted zone. What is the best way to do it? (Algorithm/Technology/Library) I have no technology restrictions so the solution can be anything e.g Java, C, Perl (this is my favorite), etc I started working on a solution, but then I realized this issue must have been solved millions of times in the past and there's no reason for "reinventing the wheel" :) I am new to Geographic/Geometric kind of problems, and I would greatly appreciate any advice of what approach should I take. Cheers

Original source