Package com.bbn.openmap.util.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


    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

     * 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

        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

        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

TOP

Related Classes of com.bbn.openmap.util.quadtree.QuadTree

Copyright © 2018 www.massapicom. 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.