Esempio n. 1
0
 private SpatialEnvelope calculateEnvelope(Geometry geom)
 {
     Envelope env = new Envelope();
     geom.GetEnvelope(env);
     SpatialEnvelope ogrenv = new SpatialEnvelope(env.MinX, env.MinY, env.MaxX, env.MaxY);
     return ogrenv;
 }
Esempio n. 2
0
 private void setEnvelope(SpatialEnvelope other)
 {
     if (this._envelope == null)
     {
         this._envelope = other;
     }
     else
     {
         if (other.maxx > this._envelope.maxx)
         {
             this._envelope.maxx = other.maxx;
         }
         if (other.maxy > this._envelope.maxy)
         {
             this._envelope.maxy = other.maxy;
         }
         if (other.minx < this._envelope.minx)
         {
             this._envelope.minx = other.minx;
         }
         if (other.miny < this._envelope.miny)
         {
             this._envelope.miny = other.miny;
         }
     }
 }
Esempio n. 3
0
 public QuadTree(SpatialEnvelope envelope)
 {
     this._envelope = envelope;
     this._records  = new List <T>();
     this._depth    = 0;
     this._maxDepth = 8;
     this._nodes    = new List <QuadTree <T> >();
 }
Esempio n. 4
0
        private SpatialEnvelope calculateEnvelope(Geometry geom)
        {
            Envelope env = new Envelope();

            geom.GetEnvelope(env);
            SpatialEnvelope ogrenv = new SpatialEnvelope(env.MinX, env.MinY, env.MaxX, env.MaxY);

            return(ogrenv);
        }
Esempio n. 5
0
 public bool contains(SpatialEnvelope other)
 {
     if (this._minx <= other.minx &&
         this._maxx >= other.maxx &&
         this._miny <= other.miny &&
         this._maxy >= other.maxy)
     {
         return(true);
     }
     return(false);
 }
Esempio n. 6
0
 public bool intersects(SpatialEnvelope other)
 {
     if (this._minx <= other.maxx &&
         this._maxx >= other.minx &&
         this._miny <= other.maxy &&
         this._maxy >= other.miny)
     {
         return(true);
     }
     return(false);
 }
Esempio n. 7
0
 public bool intersects(SpatialEnvelope other)
 {
     if (this._minx <= other.maxx &&
         this._maxx >= other.minx &&
         this._miny <= other.maxy &&
         this._maxy >= other.miny)
     {
         return true;
     }
     return false;
 }
Esempio n. 8
0
 public bool contains(SpatialEnvelope other)
 {
     if (this._minx <= other.minx &&
         this._maxx >= other.maxx &&
         this._miny <= other.miny &&
         this._maxy >= other.maxy)
     {
         return true;
     }
     return false;
 }
Esempio n. 9
0
 public OGRBufferCacheRow(object[] bufferRow, Geometry geom)
 {
     this._bufferRow = bufferRow;
     this._geom      = geom;
     this._envelope  = this.calculateEnvelope(geom);
 }
Esempio n. 10
0
 public OGRBufferCache()
 {
     this._rows         = new List <OGRBufferCacheRow>();
     this._envelope     = null;
     this._spatialIndex = null;
 }
Esempio n. 11
0
 public OGRBufferCache()
 {
     this._rows = new List<OGRBufferCacheRow>();
     this._envelope = null;
     this._spatialIndex = null;
 }
Esempio n. 12
0
 private void setEnvelope(SpatialEnvelope other)
 {
     if (this._envelope == null)
     {
         this._envelope = other;
     }
     else
     {
         if (other.maxx > this._envelope.maxx) { this._envelope.maxx = other.maxx; }
         if (other.maxy > this._envelope.maxy) { this._envelope.maxy = other.maxy; }
         if (other.minx < this._envelope.minx) { this._envelope.minx = other.minx; }
         if (other.miny < this._envelope.miny) { this._envelope.miny = other.miny; }
     }
 }
Esempio n. 13
0
 public OGRBufferCacheRow(object[] bufferRow, Geometry geom)
 {
     this._bufferRow = bufferRow;
     this._geom = geom;
     this._envelope = this.calculateEnvelope(geom);
 }