Package com.bbn.openmap.omGraphics.grid

Examples of com.bbn.openmap.omGraphics.grid.GridData


                : LinkGraphicConstants.COLUMN_MAJOR;

        int rows = grid.getRows();
        int columns = grid.getColumns();

        GridData gd = grid.getData();

        if (!(gd instanceof GridData.Int)) {
            Debug.output("LinkGrid requires OMGrid containing integer data.");
            return;
        }
View Full Code Here


         */

        // Since GridObjects only work with a int array, we need to
        // check to see if the GridObject is of type GridData.Int and
        // only bother returning if it is.
        GridData gd = getData();
        if (gd instanceof GridData.Int) {
            GridData.Int gdi = (GridData.Int) gd;

            Point pt = new Point();
            boolean major = gdi.getMajor();
View Full Code Here

            lat_index = Math.round((pt.y - point1.y) / verticalResolution);
            lon_index = Math.round((pt.x - point1.x) / horizontalResolution);
        }

        GridData gd = getData();

        if (gd != null && (lat_index >= 0 || lat_index < rows)
                && (lon_index >= 0 || lon_index < columns)) {
            Object obj = null;
            if (major == COLUMN_MAJOR) {
                obj = gd.get(lon_index, lat_index);
            } else {
                obj = gd.get(lat_index, lon_index);
            }

            return obj;
        }
View Full Code Here

     */
    public int interpValueAt(float lat, float lon, Projection proj) {
        float lat_index = -1;
        float lon_index = -1;

        GridData gridData = getData();

        if (!(gridData instanceof GridData.Int)) {
            Debug.error("OMGrid.interpValueAt only works for integer data.");
            return 0;
        }

        int[][] data = ((GridData.Int) gridData).getData();
        boolean major = gridData.getMajor();

        if (renderType == RENDERTYPE_LATLON) {

            lat_index = (lat - latitude) / verticalResolution;
            lon_index = (lon - longitude) / horizontalResolution;
View Full Code Here

        // the actual coordinates.

        Point p = new Point();
        int pointer = 0;

        GridData gridData = grid.getData();

        if (!(gridData instanceof GridData.Int)) {
            // Need to fix this to work with all GridData types!
            Debug.error("OMGrid.interpValueAt only works for integer data.");
        }

        int[][] data = ((GridData.Int) gridData).getData();
        boolean major = gridData.getMajor();

        //         int[][] data = grid.getData();
        //         boolean major = grid.getMajor();

        int dataPoint;
View Full Code Here

TOP

Related Classes of com.bbn.openmap.omGraphics.grid.GridData

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.