Package com.bbn.openmap.proj

Examples of com.bbn.openmap.proj.Projection


                Debug.error("E00Layer|" + getName() + ".prepare(): "
                        + ex.getMessage());
            }
        }

        Projection proj = getProjection();
        if (proj != null && g != null) {
            g.generate(proj);
        }

        return g;
View Full Code Here


            Debug.error("VPFLayer.getRectangle:  Data path probably wasn't set correctly ("
                    + dpb.toString() + ").  The warehouse not initialized.");
            return null;
        }

        Projection p = getProjection();

        if (p == null) {
            Debug.error("VPFLayer.getRectangle() called without a projection set in the layer. Make sure a projection is set in the layer before calling getRectangle.");
            return new OMGraphicList();
        }

        LatLonPoint upperleft = p.getUpperLeft();
        LatLonPoint lowerright = p.getLowerRight();
        if (Debug.debugging("vpfdetail")) {
            Debug.output("VPFLayer.getRectangle: " + coverageType /*
                                                                   * + " " +
                                                                   * dynamicArgs
                                                                   */);
        }

        warehouse.clear();

        //      int edgecount[] = new int[] { 0 , 0 };
        //      int textcount[] = new int[] { 0 , 0 };
        //      int areacount[] = new int[] { 0 , 0 };

        // Check both dynamic args and palette values when
        // deciding what to draw.
        if (Debug.debugging("vpf")) {
            Debug.output("VPFLayer.getRectangle(): "
                    + "calling draw with boundaries: " + upperleft + " "
                    + lowerright);
        }
        long start = System.currentTimeMillis();

        StringTokenizer t = new StringTokenizer(coverageType);
        while (t.hasMoreTokens()) {
            String currentCoverage = t.nextToken();
            if (searchByFeatures) {
                lst.drawFeatures((int) p.getScale(),
                        p.getWidth(),
                        p.getHeight(),
                        currentCoverage,
                        (VPFFeatureWarehouse) warehouse,
                        upperleft,
                        lowerright);
            } else {
                lst.drawTile((int) p.getScale(),
                        p.getWidth(),
                        p.getHeight(),
                        currentCoverage,
                        warehouse,
                        upperleft,
                        lowerright);
            }
View Full Code Here

     *
     * @return OMGraphicList
     */
    public synchronized OMGraphicList prepare() {

        Projection projection = getProjection();
        LatLonPoint ul = projection.getUpperLeft();
        LatLonPoint lr = projection.getLowerRight();
        float ulLat = ul.getLatitude();
        float ulLon = ul.getLongitude();
        float lrLat = lr.getLatitude();
        float lrLon = lr.getLongitude();

View Full Code Here

    /**
     * If the projection is not null, generate the OMGraphic.
     */
    protected void generateOMGraphic(OMGraphic g) {
        if (g != null && g.getNeedToRegenerate()) {
            Projection proj = getProjection();
            if (proj != null) {
                g.generate(proj);
            } else if (DEBUG) {
                Debug.output("OMDrawingTool: graphic needs generation: "
                        + g.getNeedToRegenerate());
View Full Code Here

            JRadioButtonMenuItem rb = (JRadioButtonMenuItem) (ae.getSource());
            String projclassname = rb.getName();
            Debug.message("projectionmenu", "ProjectionMenu new proj name: "
                    + projclassname);
            try {
                Projection newProj = ProjectionFactory.makeProjection(projclassname,
                        projection);
                fireProjectionChanged(newProj);
            } catch (ProjectionException pe) {
                rb.setEnabled(false);
            }
View Full Code Here

    public void projectionChanged(ProjectionEvent e) {
        if (Debug.debugging("projectionmenu")) {
            System.out.println("ProjectionMenu.projectionChanged()");
        }

        Projection newProj = e.getProjection();
        if (projection == null || (!projection.equals(newProj))) {
            setProjection((Projection) newProj.makeClone());
            Object source = e.getSource();
            if (source instanceof Component) {
                projComponent = (Component) source;
            }
        }
View Full Code Here

        drawingAttributes.setProperties(prefix, properties);
    }

    public synchronized OMGraphicList prepare() {

        Projection proj = getProjection();

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

            if (envHeight <= 0) {
                envHeight = (int) d.getHeight();
            }
        }

        Projection proj = ProjectionFactory.getDefaultProjectionFromEnvironment();

        if (Debug.debugging("mappanel")) {
            Debug.output("MapPanel: creating MapBean with initial projection "
                    + proj);
        }
View Full Code Here

    /**
     * The main method call in the ScenarioGraphicLoader that actually
     * modifies the OMGraphics and updates the map.
     */
    public synchronized void manageGraphics() {
        Projection p = getProjection();
        OMGraphicHandler receiver = getReceiver();
        boolean DEBUG = Debug.debugging("scenario");
        if (receiver != null && p != null) {
            if (scenarioGraphics == null) {
                scenarioGraphics = createData();
View Full Code Here

        if (sourceMap == null) {
            sourceMap = (MapBean) projEvent.getSource();
            map.setBckgrnd(sourceMap.getBckgrnd());
        }

        Projection proj = projEvent.getProjection();
        if (proj == null) {
            return;
        }

        if (statusLayer != null
                && statusLayer instanceof OverviewMapStatusListener) {
            ((OverviewMapStatusListener) statusLayer).setSourceMapProjection(proj);
        }

        float newScale = proj.getScale() * scaleFactor;

        // Adjust the newScale based on the ratio of the
        // source projection width and the overview
        // map projection width.
        Projection sourceProj = sourceMap.getProjection();
        newScale *= (float) sourceProj.getWidth()
                / (float) projection.getWidth();

        if (newScale < minScale) {
            newScale = minScale;
        }
View Full Code Here

TOP

Related Classes of com.bbn.openmap.proj.Projection

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.