Esempio n. 1
0
 public QLeaf SetLock(double latitud, double longitud, bool valor)
 {
     if (AlphaChannel == null)
     {
         return(null);
     }
     AlphaChannel.SetValue(latitud, longitud, valor ? 1 : 0);
     return(GetQLeaf(latitud, longitud));
 }
Esempio n. 2
0
        public QLeaf SetValue(double lat, double lon, int valor, bool lockLeaf)
        {
            var inside = IsInsideQtree(lat, lon);

            if (inside)
            {
                Repository.SetPositionClass((float)lat, (float)lon, valor);
            }
            var index = GetIndex(lat, lon);
            var pos   = GetLatLon(index);

            if (lockLeaf && AlphaChannel != null)
            {
                AlphaChannel.SetValue(lat, lon, 1);
            }
            return(new QLeaf {
                Index = index, Posicion = pos, Valor = inside ? valor : 0
            });
        }