Examples of Projection


Examples of com.bbn.openmap.proj.Projection

    }

    public void paint(Graphics g) {
        if (layer != null) {
            OMGraphicList list = layer.getList();
            Projection proj = layer.getProjection();
            if (list != null && layer.isProjectionOK(proj)) {
                if (proj != null) {
                    g.setClip(0, 0, proj.getWidth(), proj.getHeight());
                }

                setCompositeOnGraphics((Graphics2D) g);

                list.render(g);
View Full Code Here

Examples of com.bbn.openmap.proj.Projection

     *      Make Pan event for the map.
     */
    public void mouseReleased(MouseEvent arg0) {
        if (isPanning && arg0.getSource() instanceof MapBean) {
            MapBean mb = (MapBean) arg0.getSource();
            Projection proj = mb.getProjection();
            Point center = proj.forward(proj.getCenter());
            center.setLocation(center.getX() - arg0.getX() + oX, center.getY() - arg0.getY() + oY);
            mb.setCenter(proj.inverse(center));
            isPanning = false;
            // bufferedMapImage = null; //clean up when not active...
        }
        super.mouseReleased(arg0);
    }
View Full Code Here

Examples of com.bbn.openmap.proj.Projection

                InputStream inputStream = url.openStream();

                props = new Properties();
                props.load(inputStream);

                Projection proj = null;

                String finalOutputPath = ImageServer.createImageFile(null,
                        props,
                        proj,
                        imagefile);
View Full Code Here

Examples of com.bbn.openmap.proj.Projection

        if (spatialIndexes == null || spatialIndexes.size() == 0) {
            Debug.message("shape", "MultiShapeLayer: spatialIndexes is empty!");
            return new OMGraphicList();
        }

        Projection projection = getProjection();

        if (projection == null) {
            // This can happen if the layer is part of a
            // ScaleFilterLayer, and the redraw button for this layer
            // is pressed before the ScaleFilterLayer gives it a
            // projection (which only happens if the layer is the
            // active one).
            Debug.message("basic", "MultiShapeLayer|" + getName()
                    + ": prepare called with null projection");
            return new OMGraphicList();
        }

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

        OMGraphicList masterList = new OMGraphicList();
        OMGraphicList list = null;
        SpatialIndexHandler sih;
        Iterator sii;

        // check for dateline anomaly on the screen. we check for
        // ulLon >= lrLon, but we need to be careful of the check for
        // equality because of floating point arguments...
        if (ProjMath.isCrossingDateline(ulLon, lrLon, projection.getScale())) {
            if (Debug.debugging("shape")) {
                Debug.output("MultiShapeLayer.computeGraphics(): Dateline is on screen");
            }

            double ymin = (double) Math.min(ulLat, lrLat);
View Full Code Here

Examples of com.bbn.openmap.proj.Projection

        return layer;
    }

    public void projectionChanged(ProjectionEvent pe) {
        if (layer != null) {
            Projection proj = layer.setProjection(pe);
            // proj will be null if the projection hasn't changed, a
            // signal that work does not need to be done.
            if (proj != null) {
                if (Debug.debugging("layer")) {
                    Debug.output(getLayer().getName()
View Full Code Here

Examples of com.bbn.openmap.proj.Projection

     * generating things we won't see, and let the RenderPolicy check
     * to see if the list should be painted.
     */
    public void projectionChanged(ProjectionEvent pe) {
        if (layer != null) {
            Projection proj = layer.setProjection(pe);
            // proj will be null if the projection hasn't changed, a
            // signal that work does not need to be done.
            if (proj != null) {
                // Some criteria can decide whether
                // starting another thread is worth it...
View Full Code Here

Examples of com.bbn.openmap.proj.Projection

        g.setColor(java.awt.Color.darkGray);
        if (pt1 != null && pt2 != null) {
            // the line connecting the segments
            OMLine cLine = new OMLine(pt1.getLatitude(), pt1.getLongitude(), pt2.getLatitude(), pt2.getLongitude(), lineType);
            // get the map projection
            Projection proj = theMap.getProjection();
            // prepare the line for rendering
            cLine.generate(proj);
            // render the line graphic
            cLine.render(g);
        }
View Full Code Here

Examples of com.bbn.openmap.proj.Projection

                // convert into decimal degrees
                float rad = (float) ProjMath.radToDeg(dRad);
                // make the circle
                OMCircle circle = new OMCircle(pt1.getLatitude(), pt1.getLongitude(), rad);
                // get the map projection
                Projection proj = theMap.getProjection();
                // prepare the circle for rendering
                circle.generate(proj);
                // render the circle graphic
                circle.render(g);
            }
View Full Code Here

Examples of com.bbn.openmap.proj.Projection

            Debug.error("BufferedImageRenderPolicy.paint():  NULL layer, skipping...");
            return;
        }

        OMGraphicList list = layer.getList();
        Projection proj = layer.getProjection();

        if (list != null && layer.isProjectionOK(proj)) {

            if (isUseImageBuffer() && getBuffer() == null) {
                setBuffer(createAndPaintImageBuffer(list));
            }

            BufferedImage bufferedImage = getBuffer();

            if (composite != null) {
                ((Graphics2D) g).setComposite(composite);
            }
           
            setCompositeOnGraphics((Graphics2D)g);
           
            if (bufferedImage != null) {

                if (proj != null) {
                    // Gets reset by JComponent
                    g.setClip(0, 0, proj.getWidth(), proj.getHeight());
                }

                ((Graphics2D) g).drawRenderedImage((BufferedImage) bufferedImage,
                        new AffineTransform());
                if (DEBUG) {
View Full Code Here

Examples of com.bbn.openmap.proj.Projection

     */
    public void projectionChanged(ProjectionEvent e) {
        if (Debug.debugging("scaletextpanel")) {
            System.out.println("ScaleTextPanel.projectionChanged()");
        }
        Projection newProj = e.getProjection();
        if (projection == null || (!projection.equals(newProj))) {
            setProjection((Projection) newProj.makeClone());
        }
    }
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.