• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ItemVisitor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.vividsolutions.jts.index.ItemVisitor的典型用法代码示例。如果您正苦于以下问题:Java ItemVisitor类的具体用法?Java ItemVisitor怎么用?Java ItemVisitor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ItemVisitor类属于com.vividsolutions.jts.index包,在下文中一共展示了ItemVisitor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: query

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
private void query(Object searchBounds, AbstractNode node, ItemVisitor visitor) {
    List childBoundables = node.getChildBoundables();
    for (Object childBoundable1 : childBoundables) {
        Boundable childBoundable = (Boundable) childBoundable1;
        if (!this.getIntersectsOp().intersects(childBoundable.getBounds(), searchBounds)) {
            continue;
        }
        if (childBoundable instanceof AbstractNode) {
            this.query(searchBounds, (AbstractNode) childBoundable, visitor);
        } else if (childBoundable instanceof ItemBoundable) {
            visitor.visitItem(((ItemBoundable) childBoundable).getItem());
        } else {
            Assert.shouldNeverReachHere();
        }
    }
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:17,代码来源:AbstractSTRtree.java


示例2: query

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
private void query(Object searchBounds, AbstractNode node, ItemVisitor visitor) {
    List childBoundables = node.getChildBoundables();
    for (int i = 0; i < childBoundables.size(); i++) {
        Boundable childBoundable = (Boundable) childBoundables.get(i);
        if (!getIntersectsOp().intersects(childBoundable.getBounds(), searchBounds)) {
            continue;
        }
        if (childBoundable instanceof AbstractNode) {
            query(searchBounds, (AbstractNode) childBoundable, visitor);
        } else if (childBoundable instanceof ItemBoundable) {
            visitor.visitItem(((ItemBoundable) childBoundable).getItem());
        } else {
            Assert.shouldNeverReachHere();
        }
    }
}
 
开发者ID:Semantive,项目名称:jts,代码行数:17,代码来源:AbstractSTRtree.java


示例3: query

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
private void query(Object searchBounds, AbstractNode node, ItemVisitor visitor) {
  List childBoundables = node.getChildBoundables();
  for (int i = 0; i < childBoundables.size(); i++) {
    Boundable childBoundable = (Boundable) childBoundables.get(i);
    if (! getIntersectsOp().intersects(childBoundable.getBounds(), searchBounds)) {
      continue;
    }
    if (childBoundable instanceof AbstractNode) {
      query(searchBounds, (AbstractNode) childBoundable, visitor);
    }
    else if (childBoundable instanceof ItemBoundable) {
      visitor.visitItem(((ItemBoundable)childBoundable).getItem());
    }
    else {
      Assert.shouldNeverReachHere();
    }
  }
}
 
开发者ID:GitHubDroid,项目名称:geodroid_master_update,代码行数:19,代码来源:AbstractSTRtree.java


示例4: query

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
@Override
public void query(double queryMin, double queryMax, ItemVisitor visitor) {
    if (!this.intersects(queryMin, queryMax)) {
        return;
    }

    visitor.visitItem(this.item);
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:9,代码来源:IntervalRTreeLeafNode.java


示例5: query

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
@Override
    public void query(double queryMin, double queryMax, ItemVisitor visitor) {
        if (!this.intersects(queryMin, queryMax)) {
//			System.out.println("Does NOT Overlap branch: " + this);
            return;
        }
//		System.out.println("Overlaps branch: " + this);
        if (this.node1 != null) {
            this.node1.query(queryMin, queryMax, visitor);
        }
        if (this.node2 != null) {
            this.node2.query(queryMin, queryMax, visitor);
        }
    }
 
开发者ID:gegy1000,项目名称:Earth,代码行数:15,代码来源:IntervalRTreeBranchNode.java


示例6: visit

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
public void visit(Envelope searchEnv, ItemVisitor visitor) {
    if (!this.isSearchMatch(searchEnv)) {
        return;
    }

    // this node may have items as well as subnodes (since items may not
    // be wholely contained in any single subnode
    this.visitItems(searchEnv, visitor);

    for (int i = 0; i < 4; i++) {
        if (this.subnode[i] != null) {
            this.subnode[i].visit(searchEnv, visitor);
        }
    }
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:16,代码来源:NodeBase.java


示例7: query

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
/**
 * Returns items whose bounds intersect the given envelope.
 */
@Override
public void query(Envelope searchEnv, ItemVisitor visitor) {
    //Yes this method does something. It specifies that the bounds is an
    //Envelope. super.query takes an Object, not an Envelope. [Jon Aquino 10/24/2003]
    super.query(searchEnv, visitor);
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:10,代码来源:STRtree.java


示例8: getData

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
public Cancelable getData(final Envelope envelope,
        final GetDataCallback callback, boolean forceUpdate) {
    return awaitData(new DataCallback() {

        @Override
        public void onDataReceived() {
            final List<SpatialEntity2<? extends Geometry>> resultList = new ArrayList<SpatialEntity2<? extends Geometry>>();
            synchronized (mEntityIndex) {
                mEntityIndex.query(envelope, new ItemVisitor() {
                    @Override
                    public void visitItem(Object item) {
                        @SuppressWarnings("unchecked")
                        SpatialEntity2<? extends Geometry> entity = (SpatialEntity2<? extends Geometry>) item;
                        if (envelope.intersects(entity.getEnvelope())) {
                            resultList.add(entity);
                        }
                    }
                });
            }
            callback.onReceiveMeasurements(resultList);
        }

        @Override
        public void onAbort(DataSourceErrorType reason) {
            callback.onAbort(reason);
        }
    }, forceUpdate);
}
 
开发者ID:52North,项目名称:geoar-app,代码行数:29,代码来源:DataCache.java


示例9: snap

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
/**
 * Snaps (nodes) all interacting segments to this hot pixel.
 * The hot pixel may represent a vertex of an edge,
 * in which case this routine uses the optimization
 * of not noding the vertex itself
 *
 * @param hotPixel            the hot pixel to snap to
 * @param parentEdge          the edge containing the vertex, if applicable, or <code>null</code>
 * @param hotPixelVertexIndex the index of the hotPixel vertex, if applicable, or -1
 * @return <code>true</code> if a node was added for this pixel
 */
public boolean snap(HotPixel hotPixel, SegmentString parentEdge, int hotPixelVertexIndex) {
    final Envelope pixelEnv = hotPixel.getSafeEnvelope();
    final HotPixelSnapAction hotPixelSnapAction = new HotPixelSnapAction(hotPixel, parentEdge, hotPixelVertexIndex);

    index.query(pixelEnv, new ItemVisitor() {
        public void visitItem(Object item) {
            MonotoneChain testChain = (MonotoneChain) item;
            testChain.select(pixelEnv, hotPixelSnapAction);
        }
    }
    );
    return hotPixelSnapAction.isNodeAdded();
}
 
开发者ID:Semantive,项目名称:jts,代码行数:25,代码来源:MCIndexPointSnapper.java


示例10: query

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
public void query(double queryMin, double queryMax, ItemVisitor visitor) {
        if (!intersects(queryMin, queryMax)) {
//			System.out.println("Does NOT Overlap branch: " + this);
            return;
        }
//		System.out.println("Overlaps branch: " + this);
        if (node1 != null) node1.query(queryMin, queryMax, visitor);
        if (node2 != null) node2.query(queryMin, queryMax, visitor);
    }
 
开发者ID:Semantive,项目名称:jts,代码行数:10,代码来源:IntervalRTreeBranchNode.java


示例11: visit

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
public void visit(Envelope searchEnv, ItemVisitor visitor) {
    if (!isSearchMatch(searchEnv))
        return;

    // this node may have items as well as subnodes (since items may not
    // be wholely contained in any single subnode
    visitItems(searchEnv, visitor);

    for (int i = 0; i < 4; i++) {
        if (subnode[i] != null) {
            subnode[i].visit(searchEnv, visitor);
        }
    }
}
 
开发者ID:Semantive,项目名称:jts,代码行数:15,代码来源:NodeBase.java


示例12: intersectingFeatures

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
/** */
public List<VectorFeature> intersectingFeatures (Geometry geom) {
    final PreparedGeometry pGeom = PreparedGeometryFactory.prepare(geom);
    final List<VectorFeature> result = new ArrayList<VectorFeature>();
    _spatialIndex.query(geom.getEnvelopeInternal(), new ItemVisitor() {
            public void visitItem (Object item) {
                VectorFeature feature = (VectorFeature)item;
                if (pGeom.intersects(feature.getGeometry())) {
                    result.add(feature);
                }
            }
        });
    return result;
}
 
开发者ID:reuven,项目名称:modelingcommons,代码行数:15,代码来源:VectorDataset.java


示例13: visit

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
public void visit(Envelope searchEnv, ItemVisitor visitor)
{
  if (! isSearchMatch(searchEnv))
    return;

  // this node may have items as well as subnodes (since items may not
  // be wholely contained in any single subnode
  visitItems(searchEnv, visitor);

  for (int i = 0; i < 4; i++) {
    if (subnode[i] != null) {
      subnode[i].visit(searchEnv, visitor);
    }
  }
}
 
开发者ID:GitHubDroid,项目名称:geodroid_master_update,代码行数:16,代码来源:NodeBase.java


示例14: visitItems

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
private void visitItems(Envelope searchEnv, ItemVisitor visitor)
{
  // would be nice to filter items based on search envelope, but can't until they contain an envelope
  for (Iterator i = items.iterator(); i.hasNext(); ) {
    visitor.visitItem(i.next());
  }
}
 
开发者ID:GitHubDroid,项目名称:geodroid_master_update,代码行数:8,代码来源:NodeBase.java


示例15: snap

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
/**
 * Snaps (nodes) all interacting segments to this hot pixel.
 * The hot pixel may represent a vertex of an edge,
 * in which case this routine uses the optimization
 * of not noding the vertex itself
 *
 * @param hotPixel the hot pixel to snap to
 * @param parentEdge the edge containing the vertex, if applicable, or <code>null</code>
 * @param hotPixelVertexIndex the index of the hotPixel vertex, if applicable, or -1
 * @return <code>true</code> if a node was added for this pixel
 */
public boolean snap(HotPixel hotPixel, SegmentString parentEdge, int hotPixelVertexIndex)
{
  final Envelope pixelEnv = hotPixel.getSafeEnvelope();
  final HotPixelSnapAction hotPixelSnapAction = new HotPixelSnapAction(hotPixel, parentEdge, hotPixelVertexIndex);

  index.query(pixelEnv, new ItemVisitor() {
    public void visitItem(Object item) {
      MonotoneChain testChain = (MonotoneChain) item;
      testChain.select(pixelEnv, hotPixelSnapAction);
    }
  }
  );
  return hotPixelSnapAction.isNodeAdded();
}
 
开发者ID:Jules-,项目名称:terraingis,代码行数:26,代码来源:MCIndexPointSnapper.java


示例16: query

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
public void query(double min, double max, ItemVisitor visitor) {
    this.index.query(min, max, visitor);
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:4,代码来源:IndexedPointInAreaLocator.java


示例17: visitItems

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
private void visitItems(Envelope searchEnv, ItemVisitor visitor) {
    // would be nice to filter items based on search envelope, but can't until they contain an envelope
    for (Object item : items) {
        visitor.visitItem(item);
    }
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:7,代码来源:NodeBase.java


示例18: query

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
public void query(double min, double max, ItemVisitor visitor) {
    index.query(min, max, visitor);
}
 
开发者ID:Semantive,项目名称:jts,代码行数:4,代码来源:IndexedPointInAreaLocator.java


示例19: query

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
public void query(double queryMin, double queryMax, ItemVisitor visitor) {
    if (!intersects(queryMin, queryMax))
        return;

    visitor.visitItem(item);
}
 
开发者ID:Semantive,项目名称:jts,代码行数:7,代码来源:IntervalRTreeLeafNode.java


示例20: visitItems

import com.vividsolutions.jts.index.ItemVisitor; //导入依赖的package包/类
private void visitItems(Envelope searchEnv, ItemVisitor visitor) {
    // would be nice to filter items based on search envelope, but can't until they contain an envelope
    for (Iterator i = items.iterator(); i.hasNext(); ) {
        visitor.visitItem(i.next());
    }
}
 
开发者ID:Semantive,项目名称:jts,代码行数:7,代码来源:NodeBase.java



注:本文中的com.vividsolutions.jts.index.ItemVisitor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IOFConnectionBackend类代码示例发布时间:2022-05-22
下一篇:
Java DrmSessionManager类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap