title: Android Finding intersection of polygon?
body: <p>i've currently a few polygon shapes as shown below that is being drawn onto my mapview with the following code</p>
  
  <p><img src="https://i.stack.imgur.com/hD5nQ.png" alt="enter image description here"></p>
  
  <pre><code>    CustomPolygon customPolygon= data.getCustomPolygonList().get(i);
              Path path = new Path();
              path.setFillType(Path.FillType.EVEN_ODD);
              for(int n=0;n&lt;customPolygon.getCorrdinateList().size();n++)
              {
  
                  GeoPoint sector1 = new GeoPoint((int)(customPolygon.getCorrdinateList().get(n).getLatitude()*1e6), (int)((customPolygon.getCorrdinateList().get(n).getLongitude())*1e6));
                  if(n==0){
                      mapView.getProjection().toPixels(sector1, point1_draw);
                      path.moveTo(point1_draw.x,point1_draw.y);
                  }else
                  {
                      mapView.getProjection().toPixels(sector1, point1_draw);
                      path.lineTo(point1_draw.x,point1_draw.y);
                  }
              }
  
              path.close();
              canvas.drawPath(path, paint);
  </code></pre>
  
  <p>Right now i'm figuring on how do i know if the ontap button is intersecting any of the polygon. for example if it intersect one of the polygon, a message will display the current polygon. </p>
  
  <p>I'm stuck at the ontap part for the overlay. </p>
  
  <pre><code>    @Override
  public boolean onTap(GeoPoint p, MapView ) {
  
  
  
          Point point1_draw = new Point();     
          mapView.getProjection().toPixels(p, point1_draw);
  
  
          for (int i =0;i&lt;data.getCustomPolygonList().size();i++)
          {
              CustomPolygon customPolygon= data.getCustomPolygonList().get(i);
              for(int n=0;n&lt;customPolygon.getCorrdinateList().size();n++)
              {
              }
  
          }
  
      return  true;
  }
  </code></pre>