Package sil.storagemanager

Examples of sil.storagemanager.PropertySet


   
    float fillFactor = (float) minNodeEntries / (float) maxNodeEntries;
   
    // create a memory-based storage manager
    storageManager = new MemoryStorageManager();
    PropertySet propertySet = new PropertySet();
    propertySet.setProperty("FillFactor", new Double(fillFactor));
    propertySet.setProperty("IndexCapacity", new Integer(maxNodeEntries));
    propertySet.setProperty("LeafCapacity", new Integer(maxNodeEntries));
    propertySet.setProperty("Dimension", new Integer(2));
   
    String strTreeVariant = props.getProperty("TreeVariant");
    Integer intTreeVariant = null;
    if (strTreeVariant.equalsIgnoreCase("Linear")) {
      intTreeVariant = new Integer(sil.spatialindex.SpatialIndex.RtreeVariantLinear);
    } else if (strTreeVariant.equalsIgnoreCase("Quadratic")) {
      intTreeVariant = new Integer(sil.spatialindex.SpatialIndex.RtreeVariantQuadratic);
    } else {
      // default
      if (!strTreeVariant.equalsIgnoreCase("Rstar")) {
        log.error("Property key TreeVariant: invalid value " + strTreeVariant + ", defaulting to Rstar");
      }
      intTreeVariant = new Integer(sil.spatialindex.SpatialIndex.RtreeVariantRstar);
    }
    propertySet.setProperty("TreeVariant", intTreeVariant);
   
    tree = new RTree(propertySet, storageManager);
  }
View Full Code Here


    }
  }

  public PropertySet getIndexProperties()
  {
    PropertySet pRet = new PropertySet();

    // dimension
    pRet.setProperty("Dimension", new Integer(m_dimension));

    // index capacity
    pRet.setProperty("IndexCapacity", new Integer(m_indexCapacity));

    // leaf capacity
    pRet.setProperty("LeafCapacity", new Integer(m_leafCapacity));

    // R-tree variant
    pRet.setProperty("TreeVariant", new Integer(m_treeVariant));

    // fill factor
    pRet.setProperty("FillFactor", new Double(m_fillFactor));

    // near minimum overlap factor
    pRet.setProperty("NearMinimumOverlapFactor", new Integer(m_nearMinimumOverlapFactor));

    // split distribution factor
    pRet.setProperty("SplitDistributionFactor", new Double(m_splitDistributionFactor));

    // reinsert factor
    pRet.setProperty("ReinsertFactor", new Double(m_reinsertFactor));

    return pRet;
  }
View Full Code Here

TOP

Related Classes of sil.storagemanager.PropertySet

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.