Beispiel #1
0
 public Models.KmlModels.Zone GetConainerZone(double lat, double lon)
 {
     Models.KmlModels.Zone zone = null;
     foreach (var f in this)
     {
         if (f.Contains(lat, lon))
         {
             zone = f.GetZone();
             break;
         }
     }
     return(zone);
 }
Beispiel #2
0
            public ComputableZone(Models.KmlModels.Zone zone)
            {
                _zone         = zone;
                _polygonsMath = new List <PolygonMath>();

                foreach (var p in _zone.Polygons)
                {
                    var pm = new PolygonMath();
                    foreach (var l in p.Locations)
                    {
                        if (l.Latitude.HasValue && l.Longitude.HasValue)
                        {
                            pm.Points.Add(new Vector(l.Latitude.Value, l.Longitude.Value));
                        }
                    }
                    _polygonsMath.Add(pm);
                }
            }