Ejemplo n.º 1
0
 private bool IsRegionTopPointInBin(GeoXYPoint northWestPoint, GeoPolygonRegion region)
 {
     float resolution = this.m_Group.Resolution;
     List<GeoPolygon> allPolygon = region.GetAllPolygon();
     bool flag = false;
     foreach (GeoPolygon polygon in allPolygon)
     {
         if (flag)
         {
             return flag;
         }
         foreach (GeoXYPoint point in polygon.Points)
         {
             if ((((point.X > northWestPoint.X) && (point.X < (northWestPoint.X + resolution))) && (point.Y < northWestPoint.Y)) && (point.Y > (northWestPoint.Y - resolution)))
             {
                 flag = true;
                 break;
             }
         }
     }
     return flag;
 }
Ejemplo n.º 2
0
 private bool CheckBinAvailable(GeoPolygonRegion region, int index)
 {
     GeoXYPoint xYPoint = this.m_TFMatrix.GetXYPoint(index);
     float resolution = this.m_Group.Resolution;
     if (region.IsPointInRegion(xYPoint))
     {
         return true;
     }
     GeoXYPoint geoXYPoint = new GeoXYPoint(xYPoint.X + resolution, xYPoint.Y);
     if (region.IsPointInRegion(geoXYPoint))
     {
         return true;
     }
     geoXYPoint = new GeoXYPoint(xYPoint.X + resolution, xYPoint.Y - resolution);
     if (region.IsPointInRegion(geoXYPoint))
     {
         return true;
     }
     geoXYPoint = new GeoXYPoint(xYPoint.X, xYPoint.Y - resolution);
     if (region.IsPointInRegion(geoXYPoint))
     {
         return true;
     }
     List<GeoPolygon> allPolygon = region.GetAllPolygon();
     foreach (GeoPolygon polygon in allPolygon)
     {
         foreach (GeoXYPoint point3 in polygon.Points)
         {
             if ((((point3.X > xYPoint.X) && (point3.X < (xYPoint.X + resolution))) && (point3.Y < xYPoint.Y)) && (point3.Y > (xYPoint.Y - resolution)))
             {
                 return true;
             }
         }
     }
     return false;
 }