Enum Class EProjection

java.lang.Object
java.lang.Enum<EProjection>
edu.cnu.mdi.mapping.projection.EProjection
All Implemented Interfaces:
Serializable, Comparable<EProjection>, Constable

public enum EProjection extends Enum<EProjection>
Enumeration of supported map projection types.

Each constant carries a human-readable display name accessible via getName() and toString(). The enum is the single source of truth for which projections the application supports; adding a new projection requires adding a constant here, a case in ProjectionFactory, and a concrete IMapProjection implementation.

The application's initial/default projection is MapConstants.DEFAULT_PROJECTION, which is also what MapProjectionMenu pre-selects and MapView2D activates on construction. Keeping the default in MapConstants ensures both sites stay in sync.

  • Enum Constant Details

    • MERCATOR

      public static final EProjection MERCATOR
      Spherical Mercator projection (cylindrical, conformal).

      Maps the whole globe except the extreme poles (clamped at ±89°) to a rectangle. Longitude lines are equally spaced vertical lines; latitude lines are horizontal but increasingly spread toward the poles. Area is not preserved.

    • ORTHOGRAPHIC

      public static final EProjection ORTHOGRAPHIC
      Orthographic azimuthal projection (perspective view of one hemisphere).

      Simulates the view of the Earth from an infinitely distant point in space. Only the hemisphere facing the chosen center point is visible. Area distortion increases toward the limb.

    • MOLLWEIDE

      public static final EProjection MOLLWEIDE
      Mollweide equal-area pseudocylindrical projection.

      Maps the entire globe to an ellipse whose area element is everywhere proportional to the corresponding surface area on the sphere. Latitude lines are straight and parallel; meridians are elliptical arcs.

    • EQUAL_EARTH

      public static final EProjection EQUAL_EARTH
      Equal Earth equal-area pseudocylindrical projection.

      Maps the whole globe with straight parallels and curved meridians, balancing recognizable continental shapes with exact area preservation.

    • LAMBERT_EQUAL_AREA

      public static final EProjection LAMBERT_EQUAL_AREA
      Lambert azimuthal equal-area projection (whole globe on a disk).

      Maps the entire sphere to a disk of radius 2 (for a unit sphere). Like the orthographic projection it is azimuthal, but unlike it the whole globe is visible and area is preserved everywhere.

  • Method Details

    • values

      public static EProjection[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static EProjection valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getName

      public String getName()
      Returns a human-readable name suitable for use in UI labels and menus.
      Returns:
      the display name of this projection
    • toString

      public String toString()
      Returns the same value as getName(), making this enum safe to use directly in combo-box and list models that call toString().
      Overrides:
      toString in class Enum<EProjection>
      Returns:
      the display name of this projection
    • createComboBox

      public static EnumComboBox<EProjection> createComboBox()
      Creates an EnumComboBox pre-populated with every EProjection value and labeled via projectionLabel(EProjection).

      The initially selected item is null (no selection), which callers may override after construction if a specific default is needed.

      Returns:
      a new EnumComboBox configured for EProjection
    • projectionLabel

      public static String projectionLabel(EProjection p)
      Returns the short UI label used in combo boxes and menus for the given projection. This label is intentionally kept concise compared with the full getName() value.
      Parameters:
      p - the projection whose label is requested; must not be null
      Returns:
      a short, human-readable label string