Interface CartographicSupport

All Known Subinterfaces:
ILabelClass
All Known Implementing Classes:
AbstractCartographicSupport, AbstractSymbol

public interface CartographicSupport

This interface enables Cartographic support for those graphical elements that require additional runtime information rather than the feature itself geometric definitions.

It allows to realworld's measure units dimensioning.

It also supplies a toolkit to perform operations with centralized static methods.

Author:
jaume dominguez faus - jaume.dominguez@iver.es
See Also:
  • invalid reference
    inner class' methods

  • Field Details

  • Method Details

    • setUnit

      void setUnit(int unitIndex)
      Defines the unit used to express measures. It is the position of the unit in the MapContext.NAMES array.
      Parameters:
      unitIndex - , the index of the unit in the MapContext.NAMES array
    • getUnit

      int getUnit()
      Returns the unit used to express measures. It is the position of the unit in the MapContext.NAMES array.
    • getReferenceSystem

      int getReferenceSystem()
      Returns the Reference System used to draw the elements of the image.

      The elements have to be scaled to pixel when the image is bein drawn in order to compose the map. The elements of the map may define its size in other units than pixel.

      CartographicSupport enables the elements to define the size in measure units but these units may refer to different reference system. Two kinds of Reference Systems are allowed in this context: CartographicSupport.WORLD, and CartographicSupport.PAPER.

      Depending on which Reference System is used the unit used by this element refers to distances in the real world (then they are map's CRS-dependant) or screen or printer output (then they are output DPI-dependant)

      In case the unit used is pixel then the reference system does not have any effect since the source unit is the same than the target unit.

      Returns:
    • setReferenceSystem

      void setReferenceSystem(int referenceSystem)
      Sets the Reference System that defines how this units have to be handled. Possible values are:
      1. CartographySupport.WORLD: Defines that the unit values refer to distances in the world. So, the size of the element displayed depends directly on the scale and CRS used by the map. The size of the elements defined to use CartographicSupport.WORLD will match exactly to their actual size in the real world.
      2. CartographySupport.PAPER: Defines that the unit values refer to the length that the element will have regardless where it appears. If ReferenceSystem is CartographySupport.PAPER, and the length is (e.g.) millimeters the element will be displayed with the same amount of millimeters of length whether in the screen or the printer (screen DPI and printer DPI must be correctly configured).
    • getCartographicContext

      CartographicSupport.CartographicContext getCartographicContext()
    • setCartographicContext

      void setCartographicContext(ViewPort viewPort, double dpi, org.gvsig.fmap.geom.Geometry geom)
    • setCartographicContext

      void setCartographicContext(ViewPort viewPort, org.gvsig.compat.print.PrintAttributes properties, org.gvsig.fmap.geom.Geometry geom)
    • setCartographicContext

      void setCartographicContext(double dpi)
    • setCartographicContext

      void setCartographicContext(org.gvsig.compat.print.PrintAttributes properties)
    • setCartographicContext

      void setCartographicContext(CartographicSupport.CartographicContext ctx)
    • copyCartographicContext

      void copyCartographicContext(CartographicSupport element)
    • toCartographicUnits

      double toCartographicUnits(double value)
    • copyCartographicContext

      static void copyCartographicContext(CartographicSupport source, Object target)