当前位置: 首页>>代码示例>>Java>>正文


Java ItemBoundable.getItem方法代码示例

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


在下文中一共展示了ItemBoundable.getItem方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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


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