Package sil.spatialindex

Examples of sil.spatialindex.Region


 
  /**
   * @see net.sf.jsi.SpatialIndex#intersects(Rectangle, gnu.trove.TIntProcedure)
   */
  public void intersects(Rectangle r, TIntProcedure v) {
    Region region = new Region(new double[] {r.minX, r.minY}, new double[] {r.maxX, r.maxY})
    tree.intersectionQuery(region, new IntProcedureVisitor(v));
  }
View Full Code Here


  /**
   * @see net.sf.jsi.SpatialIndex#contains(Rectangle, gnu.trove.TIntProcedure)
   */
  public void contains(Rectangle r, TIntProcedure v) {
    Region region = new Region(new double[] {r.minX, r.minY}, new double[] {r.maxX, r.maxY});
    tree.containmentQuery(region, new IntProcedureVisitor(v));
  }
View Full Code Here

  /**
   * @see net.sf.jsi.SpatialIndex#add(Rectangle, int)
   */
  public void add(Rectangle r, int id) {
    Region region = new Region(new double[] {r.minX, r.minY}, new double[] {r.maxX, r.maxY});
    tree.insertData(null, region, (int)id);
    size++;
  }
View Full Code Here

  /**
   * @see net.sf.jsi.SpatialIndex#delete(Rectangle, int)
   */
  public boolean delete(Rectangle r, int id) {
    Region region = new Region(new double[] {r.minX, r.minY}, new double[] {r.maxX, r.maxY});
    if (tree.deleteData(region, (int)id)) {
      size--;
      return true;
    }
    return false;
View Full Code Here

    m_nearMinimumOverlapFactor = 32;
    m_splitDistributionFactor = 0.4f;
    m_reinsertFactor = 0.3f;
    m_dimension = 2;

    m_infiniteRegion = new Region();
    m_stats = new Statistics();

    Object var = ps.getProperty("IndexIdentifier");
    if (var != null)
    {
View Full Code Here

    m_rwLock.write_lock();

    try
    {
      Region mbr = shape.getMBR();

      byte[] buffer = null;

      if (data != null && data.length > 0)
      {
View Full Code Here

    m_rwLock.write_lock();

    try
    {
      Region mbr = shape.getMBR();
      return deleteData_impl(mbr, id);
    }
    finally
    {
      m_rwLock.write_unlock();
View Full Code Here

  public void pointLocationQuery(final IShape query, final IVisitor v)
  {
    if (query.getDimension() != m_dimension) throw new IllegalArgumentException("pointLocationQuery: Shape has the wrong number of dimensions.");
   
    Region r = null;
    if (query instanceof Point)
    {
      r = new Region((Point) query, (Point) query);
    }
    else if (query instanceof Region)
    {
      r = (Region) query;
    }
View Full Code Here

    while (! st.empty())
    {
      e = (ValidateEntry) st.pop();

      Region tmpRegion = (Region) m_infiniteRegion.clone();

      for (int cDim = 0; cDim < m_dimension; cDim++)
      {
        tmpRegion.m_pLow[cDim] = Double.POSITIVE_INFINITY;
        tmpRegion.m_pHigh[cDim] = Double.NEGATIVE_INFINITY;

        for (int cChild = 0; cChild < e.m_pNode.m_children; cChild++)
        {
          tmpRegion.m_pLow[cDim] = Math.min(tmpRegion.m_pLow[cDim], e.m_pNode.m_pMBR[cChild].m_pLow[cDim]);
          tmpRegion.m_pHigh[cDim] = Math.max(tmpRegion.m_pHigh[cDim], e.m_pNode.m_pMBR[cChild].m_pHigh[cDim]);
        }
      }

      if (! (tmpRegion.equals(e.m_pNode.m_nodeMBR)))
      {
        System.err.println("Invalid parent information");
        ret = false;
      }
      else if (! (tmpRegion.equals(e.m_parentMBR)))
      {
        System.err.println("Error in parent");
        ret = false;
      }
View Full Code Here

    byte[] m_pData;

    Data(byte[] pData, Region mbr, int id) { m_id = id; m_shape = mbr; m_pData = pData; }

    public int getIdentifier() { return m_id; }
    public IShape getShape() { return new Region(m_shape); }
View Full Code Here

TOP

Related Classes of sil.spatialindex.Region

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.