Examples of OMGraphicList


Examples of com.bbn.openmap.omGraphics.OMGraphicList

        float ulLat = ul.getLatitude();
        float ulLon = ul.getLongitude();
        float lrLat = lr.getLatitude();
        float lrLon = lr.getLongitude();

        OMGraphicList list = areas.getGraphics(ulLat,
                ulLon,
                lrLat,
                lrLon,
                getProjection());
        return list;
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphicList

            if (!(currentEditable instanceof EditableOMGraphicList)) {
                if (DEBUG) {
                    Debug.output("OMDrawingTool.select:  already working on OMGraphic, creating an EditableOMGraphicList for selection mode");
                }

                EditableOMGraphicList eomgl = new EditableOMGraphicList(new OMGraphicList());
                eomgl.setProjection(getProjection());
                DrawingToolRequestorList rl = new DrawingToolRequestorList();
                // Add what's current to the requestor list
                rl.add(currentEditable.getGraphic(), requestor);
                // then add the current editable to the eomgl
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphicList

     * @param p projection of the screen, holding scale, center coords, height,
     *        width.
     */
    public OMGraphicList getRectangle(Projection p) {

        OMGraphicList list = (OMGraphicList) getList();
        list.clear();

        if (DEBUG) {
            Debug.output("CSVTIPI: getRectangle");
        }

        if (tilefile == null) {
            loadTiles(tileFileName);
        }

        // doesn't matter if loadDataFile fails or not, the iterator
        // will be empty if it is.

        // Now, add the tiles that are on the screen.
        Iterator it = tiles.iterator();
        while (it.hasNext()) {

            OMScalingRaster tile = (OMScalingRaster) it.next();

            if (tile.isOnMap(p)) {
                if (DEBUG) {
                    Debug.output("CSVTIPI: image on map");
                }
                tile.generate(p);
                list.add(tile);
            } else if (DEBUG) {
                Debug.output("CSVTIPI: image not on map, skipping");
            }
        }
        repaint();
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphicList

        if (proj == null) {
            Debug.output("MysqlGeometryLayer.prepare: null projection!");
            return null;
        }

        OMGraphicList graphics = new OMGraphicList();

        try {

            Class.forName(dbClass).newInstance();
            try {
                conn = DriverManager.getConnection(dbUrl);
            } catch (Exception ex) {
                ex.printStackTrace();
            }

            stmt = conn.createStatement();

            String q = "SELECT ID, AsText(" + geomColumn + ") FROM "
                    + geomTable
                    + " WHERE MBRIntersects(GEO, GeomFromText('Polygon(( "
                    + getProjection().getUpperLeft().getLongitude() + " "
                    + getProjection().getUpperLeft().getLatitude() + ", "
                    + getProjection().getUpperLeft().getLongitude() + " "
                    + getProjection().getLowerRight().getLatitude() + ", "
                    + getProjection().getLowerRight().getLongitude() + " "
                    + getProjection().getLowerRight().getLatitude() + ", "
                    + getProjection().getLowerRight().getLongitude() + " "
                    + getProjection().getUpperLeft().getLatitude() + ", "
                    + getProjection().getUpperLeft().getLongitude() + " "
                    + getProjection().getUpperLeft().getLatitude() + "))'))";

            if (Debug.debugging("mysql")) {
                Debug.output("MysqlGeometryLayer query: " + q);
            }

            stmt.executeQuery(q);
            rs = stmt.getResultSet();
            graphics.clear();

            while (rs.next()) {

                String result = rs.getString(2);

                if (Debug.debugging("mysql")) {
                    Debug.output("MysqlGeometryLayer result: " + result);
                }

                MysqlGeometry mg = MysqlWKTGeometryFactory.createGeometry(result);
                OMGraphic omg = createGraphic(mg);
                omg.generate(proj);
                graphics.add(omg);
            }

            rs.close();
            conn.close();
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphicList

        Vector v = myPoly.getRings();
        int size = v.size();

        OMGraphic ret = null;
        OMPoly ompoly = null;
        OMGraphicList subList = null;

        if (size > 1) {
            subList = new OMGraphicList();
            ret = subList;
        }

        for (int i = 0; i < size; i++) {
            ompoly = new OMPoly(DoubleToFloat((double[]) v.elementAt(i)), OMGraphic.DECIMAL_DEGREES, OMGraphic.LINETYPE_STRAIGHT);

            drawingAttributes.setTo(ompoly);

            if (subList != null) {
                subList.add(ompoly);
            } else {
                ret = ompoly;
            }
        }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphicList

                    || type.equals(MysqlGeometry.MULTILINESTRINGTYPE)
                    || type.equals(MysqlGeometry.MULTIPOLYGONTYPE)
                    || type.equals(MysqlGeometry.GEOMETRYCOLLECTIONTYPE)) {

                MysqlMulti multi = (MysqlMulti) mg;
                OMGraphicList subList = new OMGraphicList();
                for (int i = 0; i < multi.countElements(); i++) {
                    OMGraphic subRet = null;
                    if (type.equals(MysqlGeometry.MULTIPOINTTYPE)) {
                        subRet = createPoint((MysqlPoint) multi.getElementByIndex(i));
                    } else if (type.equals(MysqlGeometry.MULTILINESTRINGTYPE)) {
                        subRet = createLine((MysqlLine) multi.getElementByIndex(i));
                    } else if (type.equals(MysqlGeometry.MULTIPOLYGONTYPE)) {
                        subRet = createPolygon((MysqlPolygon) multi.getElementByIndex(i));
                    } else if (type.equals(MysqlGeometry.GEOMETRYCOLLECTIONTYPE)) {
                        subRet = createGraphic((MysqlGeometry) multi.getElementByIndex(i));
                    }

                    if (subRet != null) {
                        subList.add(subRet);
                    }
                }
                ret = subList;
            } else {
                // Other types of geometry
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphicList

        /*
         * By creating a new list, we avoid
         * ConcurrentModificationExceptions within the PlugInLayer,
         * and within the GraphicLoaderPlugIn during generate().
         */
        omList = new OMGraphicList();

        if (nodeList != null) {
            Enumeration list = nodeList.elements();

            while ((list != null) && list.hasMoreElements()) {
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphicList

                + (direction * (int) (rPrime * Math.sin(inverseSlope)));

        if (Debug.debugging("arc")) {

            Debug.output("ArcCalc.generateArc: creating supplimental graphics list");
            arcGraphics = new OMGraphicList();

            double dist1 = Math.sqrt(Math.pow((double) (arcCenter.x - x1), 2.0)
                    + Math.pow((double) (arcCenter.y - y1), 2.0));
            double dist2 = Math.sqrt(Math.pow((double) (arcCenter.x - x2), 2.0)
                    + Math.pow((double) (arcCenter.y - y2), 2.0));
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphicList

        }
    }

    public OMGraphicList getArcGraphics() {
        if (arcGraphics == null) {
            return new OMGraphicList();
        } else {
            return arcGraphics;
        }
    }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphicList

                        infoFile.loadData(true);
                    }
                }
            }
        } catch (java.net.MalformedURLException murle) {
            omgraphics = new OMGraphicList();
        } catch (java.io.IOException ioe) {
            omgraphics = new OMGraphicList();
        } catch (Exception exc) {
            omgraphics = new OMGraphicList();
        }

        // This is handled properly yet. The PoliticalArea should be
        // updated to handle URLs for area points, and have different
        // icons for different areas.
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.