Use LFS Polygon Draw to identify new areas (streets) without the use of nodes on opened track like FEX FEY (LFS Z30 or higher)
used jsDraw2D - http://jsdraw2d.jsfiction.com/
use FireFox, Chrome
Update:
add: json style output
add: multipoligon drawing
Site where u can draw polygons
GitHub
C++ code to find point in polygon
used jsDraw2D - http://jsdraw2d.jsfiction.com/
use FireFox, Chrome
Update:
add: json style output
add: multipoligon drawing
Site where u can draw polygons
GitHub
C++ code to find point in polygon
<?php
x,y - curent position
polyX[] - array of X polygon points
polyY[] - array of Y polygon points
polySides - count of points
bool checkPosition(int polySides,int polyX[],int polyY[],int x,int y)
{
int i, j=polySides-1 ;
bool oddNodes=false ;
for (i=0; i<polySides; i++)
{
if (polyY[i]<y && polyY[j]>=y
|| polyY[j]<y && polyY[i]>=y)
{
if (polyX[i]+(y-polyY[i])/(polyY[j]-polyY[i])*(polyX[j]-polyX[i])<x)
{
oddNodes=!oddNodes;
}
}
j=i;
}
return oddNodes;
}
?>