Class CoordinateInfo

java.lang.Object
hec.map.transform.CoordinateInfo
All Implemented Interfaces:
AsciiSerializable, FieldAccessor, CoordinateTransformConstants, Serializable
Direct Known Subclasses:
AlbersLambertCoordinateInfo, GeographicCoordinateInfo, PolarStereographicCoordinateInfo, StatePlaneCoordinateInfo, TransverseMercatorCoordinateInfo, UTMCoordinateInfo, XYCoordinateInfo

public abstract class CoordinateInfo extends Object implements Serializable, AsciiSerializable, CoordinateTransformConstants
See Also:
  • Field Details

    • _type

      protected String _type
    • _units

      protected String _units
    • _unitMultiplier

      protected double _unitMultiplier
    • _spheroid

      protected String _spheroid
    • COORDINATEINFO_BEGIN

      public static final String COORDINATEINFO_BEGIN
      See Also:
    • COORDINATEINFO_END

      public static final String COORDINATEINFO_END
      See Also:
    • INT_CLASS_ARGS

      protected static final Class[] INT_CLASS_ARGS
    • _mapCoordinateInfo

      protected static Hashtable _mapCoordinateInfo
  • Constructor Details

    • CoordinateInfo

      public CoordinateInfo()
    • CoordinateInfo

      public CoordinateInfo(String units, String spheroid)
  • Method Details

    • setUnits

      public void setUnits(String units)
    • setUnitMultiplier

      public void setUnitMultiplier(double m)
    • setSpheroid

      public void setSpheroid(String spheroid)
    • getType

      public abstract String getType()
    • getUnits

      public String getUnits()
    • getUnitMultiplier

      public double getUnitMultiplier()
    • getWKT

      public String getWKT()
    • getLengthConvFactor

      public double getLengthConvFactor(int unitSystemId)
      returns the conversion factor that multiplies the base length unit in the maps world coordinates to feet or meters depending on the given unit system id
      Parameters:
      unitSystemId -
      Returns:
    • getSpheroid

      public String getSpheroid()
    • set

      public void set(String units, String spheroid)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • writeObject

      public void writeObject(BufferedWriter writer) throws IOException
      Throws:
      IOException
    • writeObject2

      protected abstract void writeObject2(BufferedWriter writer) throws IOException
      Throws:
      IOException
    • readObject

      public static CoordinateInfo readObject(BufferedReader reader) throws IOException
      Throws:
      IOException
    • setType

      public void setType(String type)
    • readObject2

      protected abstract void readObject2(BufferedReader reader) throws IOException
      Throws:
      IOException
    • saveData

      public boolean saveData(org.jdom.Element cinfoElem)
      XML format save
      Parameters:
      cinfoElem -
      Returns:
    • loadData

      public boolean loadData(org.jdom.Element cinfoElem)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFieldObject

      public Object getFieldObject(Field fld)
      Description copied from interface: FieldAccessor
      This method allows access to java.lang.reflect.Field objects within the implementing class.
      Specified by:
      getFieldObject in interface FieldAccessor
      Parameters:
      fld - The field to get.
      Returns:
      The data object that is stored in the given field
    • setFieldObject

      public boolean setFieldObject(Field fld, Object fobj)
      Description copied from interface: FieldAccessor
      This allows access to fields withing the implementing object to set there data.
      Specified by:
      setFieldObject in interface FieldAccessor
      Parameters:
      fld - The java field object representing the member field to be set
      fobj - The data to set in that field
      Returns:
      returns true if successful