i have a typical question with the Geometric datatype of mysql, polygon.
I have the polygon data, in the form of an array of latitudes and longitudes, ex:
The popular answer above contains typos. Elsewhere, this code has been cleaned up. The corrected code is as follows:
$latitude_y != ($vertices_y[$j] > $latitude_y)) &&
($longitude_x < ($vertices_x[$j] - $vertices_x[$i]) * ($latitude_y - $vertices_y[$i]) / ($vertices_y[$j] - $vertices_y[$i]) + $vertices_x[$i]) ) )
$c = !$c;
}
return $c;
}
?>