Examples of QuadTree


Examples of com.vividsolutions.jts.index.quadtree.Quadtree

     */
    public Map<String, SimpleFeature> getAdded() {
        return added;
    }
  protected Quadtree copySTRtreeFrom(Diff diff) {
    Quadtree tree = new Quadtree();
   
    synchronized (diff) {
      Iterator<Entry<String,SimpleFeature>> i = diff.added.entrySet().iterator();
      while (i.hasNext()) {
        Entry<String,SimpleFeature> e = i.next();
        SimpleFeature f = (SimpleFeature) e.getValue();
        if (!diff.modifiedFeatures.containsKey(f.getID())) {
          tree.insert(ReferencedEnvelope.reference(f.getBounds()), f);
        }
      }
      Iterator<Entry<String,SimpleFeature>> j = diff.getModified().entrySet().iterator();
      while( j.hasNext() ){
        Entry<String,SimpleFeature> e = j.next();
        SimpleFeature f = (SimpleFeature) e.getValue();
        tree.insert(ReferencedEnvelope.reference(f.getBounds()), f);
      }
    }
   
    return tree;
  }
View Full Code Here

Examples of com.vividsolutions.jts.index.quadtree.Quadtree

 
  public PolygonGraphGenerator(GraphBuilder builder,PolygonRelationship rel) {
    setGraphBuilder(builder);
    this.rel = rel;
   
    index = new Quadtree();
  }
View Full Code Here

Examples of com.vividsolutions.jts.index.quadtree.Quadtree

  public void testSpatialIndex()
  throws Exception
  {
    SpatialIndexTester tester = new SpatialIndexTester();
    tester.setSpatialIndex(new Quadtree());
    tester.init();
    tester.run();
    assertTrue(tester.isSuccess());
  }
View Full Code Here

Examples of com.vividsolutions.jts.index.quadtree.Quadtree

 
  public void testSerialization()
  throws Exception
  {
    SpatialIndexTester tester = new SpatialIndexTester();
    tester.setSpatialIndex(new Quadtree());
    tester.init();
    Quadtree tree = (Quadtree) tester.getSpatialIndex();
    byte[] data = SerializationUtil.serialize(tree);
    tree = (Quadtree) SerializationUtil.deserialize(data);
    tester.setSpatialIndex(tree);
    tester.run();
    assertTrue(tester.isSuccess());
View Full Code Here

Examples of com.vividsolutions.jts.index.quadtree.Quadtree


  public Roadmap(City city){
    log = city.log;
    this.city = city;
    roads = new Quadtree();
    //Load configuration file
    try {
      File configFile = new File("config/roadmapConfig.properties");
      File parent = configFile.getParentFile();
      if(!parent.exists() && !parent.mkdirs()){
View Full Code Here

Examples of org.apache.sis.index.tree.QuadTree

          NodeList depthNode = configDoc.getElementsByTagName("depth");
          if (depthNode.item(0) != null) {
            depth = Integer.parseInt(depthNode.item(0).getFirstChild()
                .getNodeValue());
          }
          this.tree = new QuadTree(capacity, depth); // TODO make this
          // configurable

          NodeList urlNodes = configDoc.getElementsByTagName("url");
          for (int i = 0; i < urlNodes.getLength(); i++) {
            // read in georss and build tree
View Full Code Here

Examples of org.apache.sis.index.tree.QuadTree

          NodeList depthNode = configDoc.getElementsByTagName("depth");
          if (depthNode.item(0) != null) {
            depth = Integer.parseInt(depthNode.item(0).getFirstChild()
                .getNodeValue());
          }
          this.tree = new QuadTree(capacity, depth); // TODO make this
          // configurable

          NodeList urlNodes = configDoc.getElementsByTagName("url");
          for (int i = 0; i < urlNodes.getLength(); i++) {
            // read in georss and build tree
View Full Code Here

Examples of org.apache.sis.storage.QuadTree

          NodeList depthNode = configDoc.getElementsByTagName("depth");
          if (depthNode.item(0) != null) {
            depth = Integer.parseInt(depthNode.item(0).getFirstChild()
                .getNodeValue());
          }
          this.tree = new QuadTree(capacity, depth); // TODO make this
          // configurable

          NodeList urlNodes = configDoc.getElementsByTagName("url");
          for (int i = 0; i < urlNodes.getLength(); i++) {
            // read in georss and build tree
View Full Code Here

Examples of org.apache.sis.storage.QuadTree

          NodeList depthNode = configDoc.getElementsByTagName("depth");
          if (depthNode.item(0) != null) {
            depth = Integer.parseInt(depthNode.item(0).getFirstChild()
                .getNodeValue());
          }
          this.tree = new QuadTree(capacity, depth); // TODO make this
          // configurable

          NodeList urlNodes = configDoc.getElementsByTagName("url");
          for (int i = 0; i < urlNodes.getLength(); i++) {
            // read in georss and build tree
View Full Code Here

Examples of org.gdbms.engine.spatial.quadtree.QuadTree

       
        return sfi;
    }
   
    public void buildIndex() throws DriverException {
        index = new QuadTree(sds.getFullExtent(), 5);
        deletedRows = new ArrayList<Integer>();
        for (int i = 0; i < sds.getRowCount(); i++) {
          org.gdbms.engine.spatial.Geometry g = sds.getFMapGeometry(i);
          if (g != null) {
            index.add(g.getBounds2D(), new Integer(i));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.