Exemplo 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;
 }
Exemplo 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;
         }
     }
 }
Exemplo 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> >();
 }
Exemplo 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);
        }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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;
 }
Exemplo 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;
 }
Exemplo n.º 9
0
 public OGRBufferCacheRow(object[] bufferRow, Geometry geom)
 {
     this._bufferRow = bufferRow;
     this._geom      = geom;
     this._envelope  = this.calculateEnvelope(geom);
 }
Exemplo n.º 10
0
 public OGRBufferCache()
 {
     this._rows         = new List <OGRBufferCacheRow>();
     this._envelope     = null;
     this._spatialIndex = null;
 }
Exemplo n.º 11
0
 public OGRBufferCache()
 {
     this._rows = new List<OGRBufferCacheRow>();
     this._envelope = null;
     this._spatialIndex = null;
 }
Exemplo 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; }
     }
 }
Exemplo n.º 13
0
 public OGRBufferCacheRow(object[] bufferRow, Geometry geom)
 {
     this._bufferRow = bufferRow;
     this._geom = geom;
     this._envelope = this.calculateEnvelope(geom);
 }