Examples of LatLonPoint


Examples of com.bbn.openmap.LatLonPoint

    /**
     * Convert this MGRSPoint to a LatLonPoint, and assume a WGS_84 ellisoid.
     */
    public LatLonPoint toLatLonPoint() {
        return toLatLonPoint(Ellipsoid.WGS_84, new LatLonPoint());
    }
View Full Code Here

Examples of com.bbn.openmap.LatLonPoint

    /**
     * Convert this MGRSPoint to a LatLonPoint, and use the given ellipsoid.
     */
    public LatLonPoint toLatLonPoint(Ellipsoid ellip) {
        return toLatLonPoint(ellip, new LatLonPoint());
    }
View Full Code Here

Examples of com.bbn.openmap.LatLonPoint

                    e = Float.parseFloat(tmp);
                    tmp = record.substring(12, 19);
                    n = Float.parseFloat(tmp);
                    zl = record.charAt(3);
                    utmp = new UTMPoint(n, e, z, zl);
                    LatLonPoint llp = utmp.toLatLonPoint();
                    mgrsp = LLtoMGRS(llp);
                    outStr1.append(record + " is " + llp + " back to "
                            + LLtoUTM(llp) + "\n");
                    outStr2.append(record + " is " + mgrsp + "\n");
                } else if (inType.equalsIgnoreCase("LatLon")) {
                    float lat, lon;
                    int index;
                    String tmp;
                    record.trim();
                    index = record.indexOf("\040");
                    if (index < 0) {
                        index = record.indexOf("\011");
                    }
                    tmp = record.substring(0, index);
                    lat = Float.parseFloat(tmp);
                    tmp = record.substring(index);
                    lon = Float.parseFloat(tmp);
                    LatLonPoint llp = new LatLonPoint(lat, lon);
                    // UTMPoint utmp = LLtoUTM(llp);
                    MGRSPoint mgrsp = LLtoMGRS(llp);
                    outStr1.append(record + " to UTM: " + mgrsp.zone_number
                            + " " + mgrsp.easting + " " + mgrsp.northing + "\n");
                    outStr2.append(record + "    ->    " + mgrsp.mgrs + "\n");
View Full Code Here

Examples of com.bbn.openmap.LatLonPoint

            try {

                float lat = Float.parseFloat(arg[0]);
                float lon = Float.parseFloat(arg[1]);

                LatLonPoint llp = new LatLonPoint(lat, lon);
                MGRSPoint mgrsp = LLtoMGRS(llp);
                UTMPoint utmp = LLtoUTM(llp);

                if (utmp.zone_letter == 'Z') {
                    Debug.output(llp + "to UTM: latitude limit exceeded.");
View Full Code Here

Examples of com.bbn.openmap.LatLonPoint

        return pt;
    }

    public Point forward(float lat, float lon, Point pt) {
        return forward(new LatLonPoint(lat, lon), pt);
    }
View Full Code Here

Examples of com.bbn.openmap.LatLonPoint

    public Point forward(float lat, float lon, Point pt) {
        return forward(new LatLonPoint(lat, lon), pt);
    }

    public Point forward(float lat, float lon, Point pt, boolean isRadian) {
        LatLonPoint ll = new LatLonPoint();
        ll.setLatLon(lat, lon, isRadian);
        return forward(ll, pt);
    }
View Full Code Here

Examples of com.bbn.openmap.LatLonPoint

        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);
        //forward(rawllpts[0], rawllpts[1], temp, true, tempUtm);
        xp = temp.x;
        xs[0] = temp.x;
        ys[0] = temp.y;
        // forward project the other points
        for (n = 1, k = 2; n < len; n++, k += 2) {
            tempLL.setLatLon(rawllpts[k], rawllpts[k + 1], true);
            forward(tempLL, temp, tempUtm);
            //forward(rawllpts[k], rawllpts[k + 1], temp, true, tempUtm);
            xs[n] = temp.x;
            ys[n] = temp.y;
            // segment crosses longitude along screen edge
View Full Code Here

Examples of com.bbn.openmap.LatLonPoint

    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);
            //forward(rawllpts[j], rawllpts[j + 1], temp, true, tempUtm);
            xcoords[i] = temp.x;
            ycoords[i] = temp.y;
            visible[i] = true;
View Full Code Here

Examples of com.bbn.openmap.LatLonPoint

    }

    public abstract Point2D forward(double lat, double lon, Point2D ret);

    public LatLonPoint inverse(double x, double y) {
        return inverse(x, y, new LatLonPoint());
    }
View Full Code Here

Examples of com.bbn.openmap.LatLonPoint

        // We have no way of constructing the User Space at anything
        // other than 0,0 for now.
        if (uCtr == null) {
            uCtrLat = (float) 0.0;
            uCtrLon = (float) 0.0;
            uCtr = new LatLonPoint(uCtrLat, uCtrLon);
        }

        if (helper == null) {
            helper = new LLXYViewHelper(uCtr, scale, width, height);
        }
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.