Class Projection

java.lang.Object
io.jmix.mapsflowui.kit.component.model.Projection
All Implemented Interfaces:
CRS, Serializable

public class Projection extends Object implements CRS, Serializable
Projection definition class.

For more details see: Projection docs

See Also:
  • Field Details

    • code

      protected final String code
    • units

      protected Units units
    • extent

      protected Extent extent
    • axisOrientation

      protected String axisOrientation
    • global

      protected Boolean global
    • metersPerUnit

      protected Double metersPerUnit
    • worldExtent

      protected Extent worldExtent
  • Constructor Details

    • Projection

      public Projection(String code)
      Inits instance with provided projection code.
      Parameters:
      code - the SRS identifier code, e.g. "EPSG:3857".
  • Method Details

    • getCode

      public String getCode()
      Returns:
      the SRS identifier code
    • getUnits

      public Units getUnits()
      Returns:
      units or null if not set
    • setUnits

      public void setUnits(Units units)
      Sets the units.

      For more details see: Projection docs

      Parameters:
      units - units to set
    • withUnits

      public Projection withUnits(Units units)
      Parameters:
      units - units to set
      Returns:
      current instance
    • getExtent

      public Extent getExtent()
      Returns:
      extent or null if not set
    • setExtent

      public void setExtent(Extent extent)
      Sets the bounding extent that validity for the SRS.

      For more details see: setExtent() docs

      Parameters:
      extent - extent to set
    • withExtent

      public Projection withExtent(Extent extent)
      Parameters:
      extent - extent to set
      Returns:
      current instance
    • getAxisOrientation

      public String getAxisOrientation()
      Returns:
      axis orientation or null if not set
    • setAxisOrientation

      public void setAxisOrientation(String axisOrientation)
      Sets the axis orientation as specified in Proj4. For instance: "enu", "neu", etc.

      For more details see: Projection docs

      Parameters:
      axisOrientation - axis orientation value
    • withAxisOrientation

      public Projection withAxisOrientation(String axisOrientation)
      Parameters:
      axisOrientation - axis orientation value
      Returns:
      current instance
    • getGlobal

      public Boolean getGlobal()
      Returns:
      is projection valid for the whole globe or null if not set
    • setGlobal

      public void setGlobal(Boolean global)
      Sets whether the projection is valid for the whole globe.

      For more details see: setGlobal() docs

      Parameters:
      global - global option
    • withGlobal

      public Projection withGlobal(Boolean global)
      Parameters:
      global - global option
      Returns:
      current instance
    • getMetersPerUnit

      public Double getMetersPerUnit()
      Returns:
      meters per unit or null if not set
    • setMetersPerUnit

      public void setMetersPerUnit(Double metersPerUnit)
      Sets the meters per unit for the SRS.

      For more details see: Projection docs

      Parameters:
      metersPerUnit - meters per unit
    • withMetersPerUnit

      public Projection withMetersPerUnit(Double metersPerUnit)
      Parameters:
      metersPerUnit - meters per unit
      Returns:
      current instance
    • getWorldExtent

      public Extent getWorldExtent()
      Returns:
      world extent or null if not set
    • setWorldExtent

      public void setWorldExtent(Extent worldExtent)
      Sets the world extent for the SRS.

      For more details see: setWorldExtent() docs

      Parameters:
      worldExtent - world extent
    • withWorldExtent

      public Projection withWorldExtent(Extent worldExtent)
      Parameters:
      worldExtent - world extent
      Returns:
      current instance
    • getName

      public String getName()
      Specified by:
      getName in interface CRS
      Returns:
      the name of projection, e.g. 'EPSG:3857'