Package com.vividsolutions.jts.index

Examples of com.vividsolutions.jts.index.SpatialIndex.query()


                geom = _geom;
            }

            SpatialIndex spatialIndex = sourceAccessor.two();
            @SuppressWarnings("unchecked")
            List<Pair<FeatureId,String>> fids = spatialIndex.query(geom.getEnvelopeInternal());
            _unrefinedMatches = new HashMap<String,FeatureId>();
            for (Pair<FeatureId, String> match : fids) {
                _unrefinedMatches.put(match.two(), match.one());
            }
        }
View Full Code Here


             * Query the spatial index for objects within the search envelope.
             * Note that this just compares the point envelope to the line envelopes
             * so it is possible that the point is actually more distant than
             * MAX_SEARCH_DISTANCE from a line.
             */
            List<LocationIndexedLine> lines = index.query(search);

            // Initialize the minimum distance found to our maximum acceptable
            // distance plus a little bit
            double minDist = MAX_SEARCH_DISTANCE + 1.0e-6;
            Coordinate minDistPoint = null;
View Full Code Here

            for (int i = 0; i < polys.size(); i++) {
                boolean found = false;
                Polygon p = (Polygon) polys.get(i);
                PreparedPolygon ppoly = new PreparedPolygon(p);

                for (final Object o : idx.query(p.getEnvelopeInternal())) {
                    SimpleFeature f = (SimpleFeature) o;

                    // Funktioniert auch intersect? Schneller?
                    if (ppoly.contains(((Geometry) f.getAttribute(geomName
                            + "_point")))) {
View Full Code Here

                    PreparedPolygon ppoly = new PreparedPolygon(p);

                    double length = 0.0;
                    SimpleFeature feat = null;

                    for (final Object o : spatialIndex.query(p
                            .getEnvelopeInternal())) {
                        SimpleFeature f = (SimpleFeature) o;
                        Geometry g = ((Geometry) f.getAttribute(geomName));
                        if (ppoly.intersects(g)) {
                            // logger.debug("***************************");
 
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.