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

Java ItemBoundable类代码示例

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

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



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

示例1: distance

import com.vividsolutions.jts.index.strtree.ItemBoundable; //导入依赖的package包/类
@Override
public double distance(ItemBoundable b1, ItemBoundable b2) {
    FacetSequence fs1 = (FacetSequence) b1.getItem();
    FacetSequence fs2 = (FacetSequence) b2.getItem();
    this.minDist = Double.MAX_VALUE;
    return this.distance(fs1, fs2);
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:8,代码来源:MinimumClearance.java


示例2: distance

import com.vividsolutions.jts.index.strtree.ItemBoundable; //导入依赖的package包/类
@Override
public double distance(ItemBoundable item1, ItemBoundable item2) {
    FacetSequence fs1 = (FacetSequence) item1.getItem();
    FacetSequence fs2 = (FacetSequence) item2.getItem();
    return fs1.distance(fs2);
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:7,代码来源:IndexedFacetDistance.java


示例3: writeItemBoundable

import com.vividsolutions.jts.index.strtree.ItemBoundable; //导入依赖的package包/类
private void writeItemBoundable(Kryo kryo, Output output, ItemBoundable itemBoundable){
    geometrySerde.write(kryo, output, itemBoundable.getBounds());
    geometrySerde.write(kryo, output, itemBoundable.getItem());
}
 
开发者ID:DataSystemsLab,项目名称:GeoSpark,代码行数:5,代码来源:SpatialIndexSerde.java


示例4: readItemBoundable

import com.vividsolutions.jts.index.strtree.ItemBoundable; //导入依赖的package包/类
private ItemBoundable readItemBoundable(Kryo kryo, Input input) {
    return new ItemBoundable(
            geometrySerde.read(kryo, input, Envelope.class),
            geometrySerde.read(kryo, input, Geometry.class)
    );
}
 
开发者ID:DataSystemsLab,项目名称:GeoSpark,代码行数:7,代码来源:SpatialIndexSerde.java


示例5: distance

import com.vividsolutions.jts.index.strtree.ItemBoundable; //导入依赖的package包/类
public double distance(ItemBoundable item1, ItemBoundable item2) {
    FacetSequence fs1 = (FacetSequence) item1.getItem();
    FacetSequence fs2 = (FacetSequence) item2.getItem();
    return fs1.distance(fs2);
}
 
开发者ID:Semantive,项目名称:jts,代码行数:6,代码来源:IndexedFacetDistance.java


示例6: distance

import com.vividsolutions.jts.index.strtree.ItemBoundable; //导入依赖的package包/类
public double distance(ItemBoundable b1, ItemBoundable b2) {
    FacetSequence fs1 = (FacetSequence) b1.getItem();
    FacetSequence fs2 = (FacetSequence) b2.getItem();
    minDist = Double.MAX_VALUE;
    return distance(fs1, fs2);
}
 
开发者ID:Semantive,项目名称:jts,代码行数:7,代码来源:MinimumClearance.java


示例7: getEnvelopesInGeometry

import com.vividsolutions.jts.index.strtree.ItemBoundable; //导入依赖的package包/类
/**
 * Retrieve all the trees envelopes that intersect the geometry.
 *
 * @param checkGeom the {@link com.vividsolutions.jts.geom.Geometry} to use to check.
 * @param doOnlyEnvelope check for the geom envelope instead of a intersection with it.
 * @param minMaxZ an array to be filled with the min and max z to be used as style.
 * @return the list of envelopes contained in the supplied geometry.
 * @throws Exception
 */
@Override
public synchronized List<Geometry> getEnvelopesInGeometry( Geometry checkGeom, boolean doOnlyEnvelope, double[] minMaxZ )
        throws Exception {
    checkOpen();
    ArrayList<Geometry> envelopeListForTile = new ArrayList<Geometry>();

    Envelope env = checkGeom.getEnvelopeInternal();
    PreparedGeometry preparedGeometry = null;
    if (!doOnlyEnvelope) {
        preparedGeometry = PreparedGeometryFactory.prepare(checkGeom);
    }
    double min = Double.POSITIVE_INFINITY;
    double max = Double.NEGATIVE_INFINITY;
    List< ? > filesList = mainLasFolderIndex.query(env);
    for( Object fileName : filesList ) {
        if (fileName instanceof String) {
            String name = (String) fileName;
            File lasFile = new File(lasFolder, name);
            File lasIndexFile = FileUtilities.substituteExtention(lasFile, "lasfix");

            String absolutePath = lasIndexFile.getAbsolutePath();
            STRtreeJGT lasIndex = fileName2IndexMap.get(absolutePath);
            if (lasIndex == null) {
                lasIndex = OmsLasIndexReader.readIndex(absolutePath);
                fileName2IndexMap.put(absolutePath, lasIndex);
            }
            List< ? > queryBoundables = lasIndex.queryBoundables(env);
            for( Object object : queryBoundables ) {
                if (object instanceof ItemBoundable) {
                    ItemBoundable itemBoundable = (ItemBoundable) object;
                    double[] item = (double[]) itemBoundable.getItem();
                    if (item.length > 0) {
                        Envelope bounds = (Envelope) itemBoundable.getBounds();
                        Polygon envelopePolygon = LasIndexer.envelopeToPolygon(bounds);
                        envelopePolygon.setUserData(new double[]{item[2], item[3]});
                        if (minMaxZ != null) {
                            min = Math.min(min, item[2]);
                            max = Math.max(max, item[2]);
                        }
                        if (doOnlyEnvelope) {
                            envelopeListForTile.add(envelopePolygon);
                        } else {
                            if (preparedGeometry.intersects(envelopePolygon)) {
                                envelopeListForTile.add(envelopePolygon);
                            }
                        }
                    }
                }
            }
        }
    }
    if (minMaxZ != null) {
        minMaxZ[0] = min;
        minMaxZ[1] = max;
    }
    return envelopeListForTile;
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:67,代码来源:LasFolderIndexDataManager.java


示例8: distance

import com.vividsolutions.jts.index.strtree.ItemBoundable; //导入依赖的package包/类
public double distance(ItemBoundable item1, ItemBoundable item2) {
  FacetSequence fs1 = (FacetSequence) item1.getItem();
  FacetSequence fs2 = (FacetSequence) item2.getItem();
  return fs1.distance(fs2);    
}
 
开发者ID:GitHubDroid,项目名称:geodroid_master_update,代码行数:6,代码来源:IndexedFacetDistance.java


示例9: distance

import com.vividsolutions.jts.index.strtree.ItemBoundable; //导入依赖的package包/类
public double distance(ItemBoundable b1, ItemBoundable b2) {
  FacetSequence fs1 = (FacetSequence) b1.getItem();
  FacetSequence fs2 = (FacetSequence) b2.getItem();
  minDist = Double.MAX_VALUE;
  return distance(fs1, fs2);
}
 
开发者ID:GitHubDroid,项目名称:geodroid_master_update,代码行数:7,代码来源:MinimumClearance.java


示例10: distance

import com.vividsolutions.jts.index.strtree.ItemBoundable; //导入依赖的package包/类
/**
 * Computes the distance between the {@link com.vividsolutions.jts.index.strtree.Boundable}s in this pair.
 * The boundables are either composites or leaves.
 * If either is composite, the distance is computed as the minimum distance
 * between the bounds.
 * If both are leaves, the distance is computed by {@link #itemDistance(com.vividsolutions.jts.index.strtree.ItemBoundable, com.vividsolutions.jts.index.strtree.ItemBoundable)}.
 * 
 * @return
 */
private double distance() {
    // if items, compute exact distance
    if (isLeaves()) {
        return itemDistance.distance((ItemBoundable) boundable1, (ItemBoundable) boundable2);
    }
    // otherwise compute distance between bounds of boundables
    return ((Envelope) boundable1.getBounds()).distance(((Envelope) boundable2.getBounds()));
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:18,代码来源:BoundablePair.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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