Examples of QuadTree


Examples of com.bbn.openmap.util.quadtree.QuadTree

     * Look in the database and create the QuadTree holding all the
     * Locations.
     */
    protected QuadTree createData() {

        QuadTree qt = new QuadTree(90.0f, -180.0f, -90.0f, 180.0f, 100, 50f);
        ByteRasterLocation loc;
        byte bytearr[];

        if (locationQueryString == null) {
            return qt;
        }

        // Code for reading from DB and pushing it into QuadTree.
        try {
            if (jdbcDriver != null) {
                Class.forName(getJdbcDriver());
            }

            Connection connection = DriverManager.getConnection(getJdbcString(),
                    getUserName(),
                    getUserPassword());

            RawDataRecordSet gifdataRS = new RawDataRecordSet(connection, getPropertyPrefix(), props);

            RecordSet locationdataRS = new RecordSet(connection, locationQueryString);

            while (locationdataRS.next()) {

                LocationData ld = new LocationData(locationdataRS);

                if (Debug.debugging("location")) {
                    Debug.output("DBLocationHandler:  location information:\n"
                            + ld);
                }

                bytearr = gifdataRS.getRawData(ld.getGraphicName());

                float lat = ld.getLatitude();
                float lon = ld.getLongitude();

                loc = new ByteRasterLocation(lat, lon, ld.getCityName(), bytearr);

                loc.setLocationHandler(this);

                // let the layer handler default set these
                // initially...
                loc.setShowName(isShowNames());
                loc.setShowLocation(isShowLocations());

                loc.setLocationPaint(getLocationColor());
                loc.getLabel().setLinePaint(getNameColor());
                loc.setDetails(ld.getCityName() + " is at lat: " + lat
                        + ", lon: " + lon);

                qt.put(lat, lon, loc);

            }

            locationdataRS.close();
            connection.close();
View Full Code Here

Examples of com.bbn.openmap.util.quadtree.QuadTree

    protected void getRoads() throws Exception {
        roadsMade = 0;
        List rectangle = layer.getGraphicList();
        int[] xPoints = new int[1024];
        int[] yPoints = new int[1024];
        interQuadTree = new QuadTree();
        graphicToRoad = new HashMap();

        int height = getProjection().getHeight();
        int width = getProjection().getWidth();
        int skipped = 0;
View Full Code Here

Examples of com.bbn.openmap.util.quadtree.QuadTree

     * Look at the CSV file and create the QuadTree holding all the
     * Locations.
     */
    protected QuadTree createData() {

        QuadTree qt = new QuadTree(90.0f, -180.0f, -90.0f, 180.0f, 100, 50f);

        if (!checkIndexSettings()) {
            return null;
        }

View Full Code Here

Examples of com.bbn.openmap.util.quadtree.QuadTree

        return horizontalList;
    }

    protected QuadTree createUTMZoneLabels() {

        QuadTree labelTree = new QuadTree();

        // Need to use MGRSPoint to get MGRS zone letters, the UTM
        // zone letters are N and S for the hemisphere, which isn't
        // very interesting.
        UTMPoint utm = new MGRSPoint();
View Full Code Here

Examples of com.bbn.openmap.util.quadtree.QuadTree

        return labelTree;
    }

    protected QuadTree createMGRSZoneLabels() {

        QuadTree labelTree = new QuadTree();

        // Need to use MGRSPoint to get MGRS zone letters, the UTM
        // zone letters are N and S for the hemisphere, which isn't
        // very interesting.
        MGRSPoint mgrs = new MGRSPoint();
View Full Code Here

Examples of com.esri.core.geometry.QuadTree

  SpatialReference spatialReference;
  QuadTree quadTree;
  QuadTreeIterator quadTreeIter;
 
  private void buildQuadTree(){
    quadTree = new QuadTree(new Envelope2D(-180, -90, 180, 90), 8);
   
    Envelope envelope = new Envelope();
    for (int i=0;i<featureClass.features.length;i++){
      featureClass.features[i].geometry.queryEnvelope(envelope);
      quadTree.insert(i, new Envelope2D(envelope.getXMin(), envelope.getYMin(), envelope.getXMax(), envelope.getYMax()));
View Full Code Here

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

    return true;
  }

  private void buildQuadtree()
  {
    quadtree = new Quadtree();

    for (int i = 0; i < rings.size(); i++) {
      LinearRing ring = (LinearRing) rings.get(i);
      Envelope env = ring.getEnvelopeInternal();
      quadtree.insert(env, ring);
View Full Code Here

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

  /**
   * This methods creates a quadtree and fills it with all existing edges
   */
  private void buildSpacialEdgeTree() {
    tree = new Quadtree();
    for (EdgeModel edge : edges) {
      Envelope e = new Envelope(
        edge.getFromNode().getLongitude(),
        edge.getToNode().getLongitude(),
        edge.getFromNode().getLatitude(),
View Full Code Here

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

        // public "views" requiring synchronised( mutex )
        modified2 = Collections.unmodifiableMap(modifiedFeatures);
        added = Collections.unmodifiableMap(addedFeatures);
        order = Collections.unmodifiableList(addedFidList);

        spatialIndex = new Quadtree();
        mutex = this;
    }
View Full Code Here

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

        synchronized (mutex) {
            nextFID = 0;
            addedFeatures.clear();
            addedFidList.clear();
            modifiedFeatures.clear();
            spatialIndex = new Quadtree();
        }
    }
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.