Record Class GeoMapProjectionRegistration

java.lang.Object
java.lang.Record
io.jmix.mapsflowui.component.projection.GeoMapProjectionRegistration
Record Components:
name - the projection name, e.g. "EPSG:21781"
definition - the projection definition in PROJ.4 format
All Implemented Interfaces:
ProjectionRegistration, Serializable

public record GeoMapProjectionRegistration(String name, String definition) extends Record implements ProjectionRegistration
Projection registration record. Should be added as bean in Spring configuration file. For instance:
 @Bean
 public ProjectionRegistration proj21781() {
     return new GeoMapProjectionRegistration("EPSG:21781",
             "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 " +
                     "+x_0=600000 +y_0=200000 +ellps=bessel " +
                     "+towgs84=660.077,13.551,369.344,2.484,1.783,2.939,5.66 +units=m +no_defs");
 }
 
See Also:
  • Constructor Details

    • GeoMapProjectionRegistration

      public GeoMapProjectionRegistration(String name, String definition)
      Creates an instance of a GeoMapProjectionRegistration record class.
      Parameters:
      name - the value for the name record component
      definition - the value for the definition record component
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface ProjectionRegistration
      Returns:
      the name of the projection, e.g. "EPSG:27700"
    • getDefinition

      public String getDefinition()
      Specified by:
      getDefinition in interface ProjectionRegistration
      Returns:
      the projection definition in PROJ.4 format
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • definition

      public String definition()
      Returns the value of the definition record component.
      Returns:
      the value of the definition record component