Package com.bbn.openmap.util

Examples of com.bbn.openmap.util.DataBounds


    /**
     * DataBoundsInformer interface.
     */
    public DataBounds getDataBounds() {
        DataBounds box = null;
        if (_list == null) {
            _list = getEsriGraphicList();
        }

        if (_list != null) {
            float[] extents = _list.getExtents();
            box = new DataBounds((double) extents[1], (double) extents[0], (double) extents[3], (double) extents[2]);
        }
        return box;
    }
View Full Code Here


    protected JSlider timeSlider;
    protected TimeSliderSupport timeSliderSupport;

    public ScenarioGraphicLoader() {
        drawingAttributes = new DrawingAttributes();
        dataBounds = new DataBounds();
        setUpdateInterval(500); // Default 1/2 second.
    }
View Full Code Here

    /**
     * DataBoundsInformer interface.
     */
    public DataBounds getDataBounds() {
        DataBounds box = null;
        if (spatialIndex != null) {
            ESRIBoundingBox bounds = spatialIndex.getBounds();
            if (bounds != null) {
                box = new DataBounds(bounds.min.x, bounds.min.y, bounds.max.x, bounds.max.y);
            }
        }
        return box;
    }
View Full Code Here

                    bounds.addBounds(boundingBox);
                }
            }
        }

        return new DataBounds(bounds.min.x, bounds.min.y, bounds.max.x, bounds.max.y);
    }
View Full Code Here

    }

    public void actionPerformed(ActionEvent ae) {
        if (map != null) {
            Proj proj = (Proj) map.getProjection();
            DataBounds bounds = provider.getDataBounds();

            if (bounds != null) {
                java.awt.geom.Point2D center = bounds.getCenter();
                if (center != null) {
                    proj.setCenter((float) center.getY(), (float) center.getX());
                    LatLonPoint llp1 = new LatLonPoint(bounds.getMax().getY(), bounds.getMin()
                            .getX());

                    LatLonPoint llp2 = new LatLonPoint(bounds.getMin().getY(), bounds.getMax()
                            .getX());

                    // 1.1 buffers the edges for viewing a little, a
                    // little zommed out.
                    proj.setScale(ProjMath.getScale(llp1, llp2, proj) * 1.1f);
 
View Full Code Here

     * DataBounds interface method, although this object doesn't
     * implement the complete interface because it doesn't have a
     * name.
     */
    public DataBounds getDataBounds() {
        DataBounds box = null;

        double minx = 180;
        double miny = 90;
        double maxx = -180;
        double maxy = -90;

        boolean set = false;

        List asrps = getASRPDirs();

        for (Iterator it = asrps.iterator(); it.hasNext();) {
            OMRect rect = ((ASRPDirectory) it.next()).getBounds();
            float n = rect.getNorthLat();
            float s = rect.getSouthLat();
            float w = rect.getWestLon();
            float e = rect.getEastLon();

            if (n < miny)
                miny = n;
            if (n > maxy)
                maxy = n;
            if (s < miny)
                miny = s;
            if (s > maxy)
                maxy = s;
            if (w < minx)
                minx = w;
            if (w > maxx)
                maxx = w;
            if (e < minx)
                minx = e;
            if (e > maxx)
                maxx = e;

            set = true;
        }

        if (set) {
            box = new DataBounds(minx, miny, maxx, maxy);

            if (Debug.debugging("asrp")) {
                Debug.output("ASRPDirectoryHandler.getDataBounds(): "
                        + box.toString());
            }
        }

        return box;
    }
View Full Code Here

    /**
     * DataBoundsInformer interface.
     */
    public DataBounds getDataBounds() {
        DataBounds box = null;

        if (asrpHandler != null) {
            box = asrpHandler.getDataBounds();
        }

View Full Code Here

TOP

Related Classes of com.bbn.openmap.util.DataBounds

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.