Android Open Source - android-openmap-framework Utilities






From Project

Back to project page android-openmap-framework.

License

The source code is released under:

Apache License

If you think the Android project android-openmap-framework listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.jwetherell.openmap.utilities;
//from   ww w  .j  a  va2s . c  o m
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;


/**
 * This abstract class provides many static methods to convert between some
 * primitive types.
 * 
 * @author Justin Wetherell <phishman3579@gmail.com>
 */
public abstract class Utilities {

    public static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd.MM.yyyy");
    public static DecimalFormat NUMBER_FORMAT = new DecimalFormat("0.00");
    public static DecimalFormat NO_DECIMAL_NUMBER_FORMAT = new DecimalFormat("0");
    public static DecimalFormat INTEGER_FORMART = new DecimalFormat("##00");

    /**
     * Convert a double point to an E6 point.
     * 
     * @param loc
     *            Double point to convert.
     * @return Integer point using E6 notation.
     */
    public static int convertPointToE6(double loc) {
        return (int) (loc * 1.0E6);
    }

    /**
     * Convert an integer E6 point to a double point.
     * 
     * @param loc
     *            Integer point using E6 notation.
     * @return Double point.
     */
    public static double convertPointFromE6(int loc) {
        return (loc / 1.0E6);
    }
}




Java Source Code List

com.jwetherell.openmap.activity.CenteredMapActivity.java
com.jwetherell.openmap.activity.CustomMapActivity.java
com.jwetherell.openmap.activity.OpenMapDemo.java
com.jwetherell.openmap.activity.configure.ConfigureUser.java
com.jwetherell.openmap.common.Ellipsoid.java
com.jwetherell.openmap.common.GreatCircle.java
com.jwetherell.openmap.common.LatLonPoint.java
com.jwetherell.openmap.common.Length.java
com.jwetherell.openmap.common.MGRSPoint.java
com.jwetherell.openmap.common.MoreMath.java
com.jwetherell.openmap.common.Planet.java
com.jwetherell.openmap.common.ProjMath.java
com.jwetherell.openmap.common.UTMPoint.java
com.jwetherell.openmap.common.ZonedUTMPoint.java
com.jwetherell.openmap.data.MessageUtilities.java
com.jwetherell.openmap.data.UserData.java
com.jwetherell.openmap.overlay.HashMapItemizedOverlay.java
com.jwetherell.openmap.utilities.Utilities.java