class OsmNogoPolygon extends OsmNodeNamed {

  public boolean intersects(int lon0, int lat0, int lon1, int lat1)
  {
    final Point p0 = new Point (lon0,lat0);
    final Point p1 = new Point (lon1,lat1);
    int i_last = points.size()-1;
    Point p2 = points.get(isClosed ? i_last : 0 );
    for (int i = isClosed ? 0 : 1 ; i <= i_last; i++)
    {
      Point p3 = points.get(i);
      // does it intersect with at least one of the polygon's segments?
      if (intersect2D_2Segments(p0,p1,p2,p3) > 0)
      {
        return true;
      }
      p2 = p3;
    }
    return false;
  }

  public  OsmNogoPolygon(boolean closed);

}