Class TLcyGridReference

All Implemented Interfaces:
ILcdExtendedModelReference, ILcdModelReference, ILcdGeoReference, ILcdGridReference, ILcdCloneable, ILcdXYWorldReference, ILcdXYZWorldReference, Serializable, Cloneable
Direct Known Subclasses:
TLcyUTMGridReference

public class TLcyGridReference extends TLcdGridReference
Adds a property displayName and a property editable to its superclass. The editable property tells the model reference addon if this geodetic reference can be modified or not. The display name is used to present the geodetic reference to a user.
See Also:
  • Constructor Details

    • TLcyGridReference

      public TLcyGridReference()
      Creates a new TLcyGridReference. You will have to set a geodetic datum and a projection before the grid reference can be used.
    • TLcyGridReference

      public TLcyGridReference(ILcdGeodeticDatum aGeodeticDatum, ILcdProjection aProjection, String aDisplayName, boolean aEditable)
      Creates a new TLcyGridReference, ready to be used.
      Parameters:
      aGeodeticDatum - The geodetic datum use.
      aProjection - The projection to use.
      aDisplayName - The display name for this grid reference.
      aEditable - True if this grid reference can be modified, false otherwise.
      See Also:
    • TLcyGridReference

      public TLcyGridReference(ILcdGeodeticDatum aGeodeticDatum, ILcdProjection aProjection, double aFalseEasting, double aFalseNorthing, double aScale, double aUnitOfMeasure, double aRotation)
      Creates a new TLcyGridReference, ready to be used.
      Parameters:
      aGeodeticDatum - The geodetic datum use.
      aProjection - The projection to use.
      aFalseEasting - The false easting of this grid reference.
      aFalseNorthing - The false northing of this grid reference.
      aScale - The scale of this grid reference.
      aUnitOfMeasure - The unit of measure of this grid reference.
      aRotation - The rotation of this grid reference.
      See Also:
    • TLcyGridReference

      public TLcyGridReference(TLcyGridReference aGridReference)
      Copy constructor.
      Parameters:
      aGridReference - The grid reference to copy.
      See Also:
    • TLcyGridReference

      public TLcyGridReference(ILcdGridReference aGridReference, String aDisplayName, boolean aEditable)
      Creates a new TLcyGridReference, ready to be used. All necessary properties are taken from the given ILcdGridReference.
      Parameters:
      aGridReference - The ILcdGridReference to take all properties from.
      aDisplayName - The display name for this grid reference.
      aEditable - True if this grid reference can be modified, false otherwise.
      See Also:
  • Method Details

    • getDisplayName

      @Deprecated public String getDisplayName()
      Deprecated.
      Use #getName() instead.
      Returns the display name of this TLcyGridReference using the method ALcdGeoReference.getName().
      Returns:
      the display name of this TLcyGridReference.
      See Also:
    • setDisplayName

      @Deprecated public void setDisplayName(String aDisplayName)
      Deprecated.
      Use #setName(String) instead.
      Sets the display name of this TLcyGridReference using the method ALcdGeoReference.setName(String).
      Parameters:
      aDisplayName - the display name of this TLcyGeodeticReference.
      See Also:
    • isEditable

      public boolean isEditable()
      Returns true if this TLcyGridReference can be edited, false otherwise.
      Returns:
      true if this TLcyGridReference can be edited, false otherwise.
      See Also:
    • setEditable

      public void setEditable(boolean aEditable)
      Sets true if this TLcyGridReference can be modified, false otherwise.
      Parameters:
      aEditable - True if this TLcyGridReference can be modified, false otherwise.
    • loadProperties

      public void loadProperties(String aPrefix, Properties aProperties) throws IllegalArgumentException
      Description copied from class: TLcdGridReference
      This method will, given aPrefix, analyze the Properties object aProperties to set the properties of this TLcdGridReference. The values of following keys are retrieved:
      • <aPrefix>.TLcdGridReference.scale
      • <aPrefix>.TLcdGridReference.falseNorthing
      • <aPrefix>.TLcdGridReference.falseEasting
      • <aPrefix>.TLcdGridReference.unitOfMeasure
      • <aPrefix>.TLcdGridReference.rotation
      To be able to set the property projection aProperties should contain entries which will be analyzed by the TLcdProjectionFactory. The keys of those entries should begin with '<aPrefix>TLcdGridReference.projection.'.

      To be able to set the property geodeticDatum the aProperties should contain entries which will be analyzed by the TLcdGeodeticDatumFactory. The keys of those entries should begin with '<aPrefix>.TLcdGridReference.geodeticDatum.'. The properties object is also passed to the TLcdModelReferenceMetadata.loadProperties(java.lang.String, java.util.Properties) with the prefix "<aPrefix>.TLcdGridReference."

      Specified by:
      loadProperties in interface ILcdModelReference
      Overrides:
      loadProperties in class TLcdGridReference
      Parameters:
      aPrefix - a common prefix for all property names that are read.
      aProperties - the properties to be parsed.
      Throws:
      IllegalArgumentException - if the model reference cannot be constructed from the properties.
      See Also:
    • writePropertiesSFCT

      public void writePropertiesSFCT(String aPrefix, Properties aProperties) throws IllegalArgumentException
      Description copied from interface: ILcdModelReference
      Stores the properties that define this model reference into the specified Properties object as a side effect. Each particular implementation of this interface can define which properties it stores.
      Specified by:
      writePropertiesSFCT in interface ILcdModelReference
      Overrides:
      writePropertiesSFCT in class TLcdGridReference
      Parameters:
      aPrefix - a common prefix for all property names written.
      aProperties - the properties that will contain the serialized properties for this model reference, as a side effect.
      Throws:
      IllegalArgumentException - if the model reference cannot be serialized into properties.
      See Also:
    • equals

      public boolean equals(Object aObj)
      Description copied from class: TLcdGridReference
      Checks on all parameters, except for the name.
      Overrides:
      equals in class TLcdGridReference
      Parameters:
      aObj - the object to check for equality.
      Returns:
      true if all parameters except the name of the grid reference are equal, false otherwise.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class TLcdGridReference
    • clone

      public Object clone()
      Description copied from class: TLcdGridReference
      Makes a deep clone of this grid reference.
      Specified by:
      clone in interface ILcdCloneable
      Overrides:
      clone in class TLcdGridReference
      See Also:
    • toString

      public String toString()
      Description copied from class: TLcdGridReference
      Returns the name of this grid reference if it is defined, calls super.toString otherwise.
      Overrides:
      toString in class TLcdGridReference
      Returns:
      the name of this grid reference if it is defined.