Examples of UTMPoint


Examples of com.bbn.openmap.proj.coords.UTMPoint

        hy = height / 2;
        wx = width / 2;

        if (xycenter != null) {
            UTMPoint c = UTMPoint.LLtoUTM(getCenter(), ellps, new UTMPoint(), zone_number, isnorthern);
            xycenter.setLocation(c.easting, c.northing);
        }

        // width of the world in pixels at current scale
        // TODO: copied from Cylindrical. may need to change
View Full Code Here

Examples of com.bbn.openmap.proj.coords.UTMPoint

        }
        return lat;
    }

    public Point forward(LatLonPoint llp, Point pt) {
        return forward(llp, pt, new UTMPoint());
    }
View Full Code Here

Examples of com.bbn.openmap.proj.coords.UTMPoint

        // the same earth radius up north..

        float widthPX = point2.x - point1.x;
        float heightPX = point2.y - point1.y;
       
        UTMPoint xx1 = UTMPoint.LLtoUTM(ll1, ellps, new UTMPoint(), zone_number, isnorthern);
        UTMPoint xx2 = UTMPoint.LLtoUTM(ll2, ellps, new UTMPoint(), zone_number, isnorthern);

        float widthMap = (xx2.easting - xx1.easting);
        float widthScale = (float) (((double) getPPM()) * (widthMap / widthPX));

        float heightMap = (xx2.northing - xx1.northing);
View Full Code Here

Examples of com.bbn.openmap.proj.coords.UTMPoint

        Point temp = new Point(0, 0);
        int[] xs = new int[len];
        int[] ys = new int[len];
       
        // more temp objects to limit number of new objects that needs to be created
        UTMPoint tempUtm = new UTMPoint();
        LatLonPoint tempLL = new LatLonPoint();

        // forward project the first point
        tempLL.setLatLon(rawllpts[0], rawllpts[1], true);
        forward(tempLL, temp, tempUtm);
View Full Code Here

Examples of com.bbn.openmap.proj.coords.UTMPoint

    public boolean forwardRaw(float[] rawllpts, int rawoff, int[] xcoords, int[] ycoords,
            boolean[] visible, int copyoff, int copylen) {
        // TODO: copied from Cylindrical. may need a change
        Point temp = new Point();
        UTMPoint tempUtm = new UTMPoint();
        LatLonPoint tempLL = new LatLonPoint();
        int end = copylen + copyoff;
        for (int i = copyoff, j = rawoff; i < end; i++, j += 2) {
            tempLL.setLatLon(rawllpts[j], rawllpts[j + 1], true);
            forward(tempLL, temp, tempUtm);
View Full Code Here

Examples of com.bbn.openmap.proj.coords.UTMPoint

            float minNorthing = northing.getText().equals("") ? 0
                    : Float.valueOf(northing.getText()).floatValue();
            northing.setText(Float.toString(Math.abs(minNorthing)));

            UTMPoint utm = new UTMPoint(minNorthing, minEasting, iZoneNumber, cZoneLetter);
            return utm.toLatLonPoint();

        } catch (NumberFormatException except) {
            Debug.output(except.toString());
            clearTextBoxes();
        }
View Full Code Here

Examples of com.bbn.openmap.proj.coords.UTMPoint

        if (llpoint == null) {
            clearTextBoxes();
            return;
        }

        UTMPoint utm = new UTMPoint(llpoint);
        northing.setText(Float.toString(utm.northing));
        easting.setText(Float.toString(utm.easting));
        zoneNumber.setText(Integer.toString(utm.zone_number));
        zoneLetter.setText((char) utm.zone_letter + "");
    }
View Full Code Here

Examples of com.bbn.openmap.proj.coords.UTMPoint

        QuadTree labelTree = new QuadTree();

        // Need to use MGRSPoint to get MGRS zone letters, the UTM
        // zone letters are N and S for the hemisphere, which isn't
        // very interesting.
        UTMPoint utm = new MGRSPoint();
        LatLonPoint llp = new LatLonPoint();
        float latitude;
        float longitude;

        for (int lat = -80; lat <= 72; lat += 8) {
View Full Code Here

Examples of com.bbn.openmap.proj.coords.UTMPoint

                                                    int gridLineInterval) {

        OMGraphicList list = new OMGraphicList();

        // Used to calculate the endpoints of the horizontal lines.
        UTMPoint utm1 = new UTMPoint(utm);
        UTMPoint utm2 = new UTMPoint(utm);
        LatLonPoint point1 = new LatLonPoint();
        LatLonPoint point2 = new LatLonPoint();

        // Used to calculate the pieces of the vertical lines.
        UTMPoint utmp = new UTMPoint(utm);
        LatLonPoint llp = new LatLonPoint();

        int i;
        OMLine line;
        BasicGeometry poly;

        float lat2;
        int endNorthing = (int) Math.floor(utm.northing / INTERVAL_100K) + 10;
        int startNorthing = (int) Math.floor(utm.northing / INTERVAL_100K) - 10;

        int numVertLines = 9;
        int numHorLines = endNorthing - startNorthing;

        float[][] vertPoints = new float[numVertLines][numHorLines * 2];

        if (UTM_DEBUG_VERBOSE) {
            Debug.output("Array is [" + vertPoints.length + "]["
                    + vertPoints[0].length + "]");
        }

        int coordCount = 0;
        boolean doPolys = true;

        utm1.easting = INTERVAL_100K;
        utm2.easting = 9 * INTERVAL_100K;

        // Horizontal lines
        for (i = startNorthing; i < endNorthing; i++) {
            utm1.northing = (float) i * gridLineInterval;
            utm2.northing = utm1.northing;
            utmp.northing = utm1.northing;

            if (doPolys) {
                for (int j = 0; j < numVertLines; j++) {
                    utmp.easting = (float) (j + 1) * gridLineInterval;
                    llp = utmp.toLatLonPoint(Ellipsoid.WGS_84, llp);

                    vertPoints[j][coordCount] = llp.getLatitude();
                    vertPoints[j][coordCount + 1] = llp.getLongitude();

                    if (UTM_DEBUG_VERBOSE) {
View Full Code Here

Examples of com.bbn.openmap.proj.coords.UTMPoint

            list.add(verticalList);
            list.add(horizontalList);
        }

        LatLonPoint center = p.getCenter();
        UTMPoint utm = new UTMPoint(center);

        if (show100kGrid) {
            Debug.message("utmgrid", "Creating 100k distance lines...");

            OMGraphicList hunKLines = createEquiDistanceLines(utm, 100000);
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.