Class SkySurfaceFactory

    • Field Detail

      • PROJECTION_KEY

        public static final ConfigKey<Projection> PROJECTION_KEY
        Config key for sky projection type.
      • REFLECT_KEY

        public static final ConfigKey<java.lang.Boolean> REFLECT_KEY
        Config key to determine whether longitude runs right to left.
      • VIEWSYS_KEY

        public static final ConfigKey<SkySys> VIEWSYS_KEY
        Config key for the sky system used for projecting the data.
      • DATASYS_KEY

        public static final ConfigKey<SkySys> DATASYS_KEY
        Config key for the sky system used for supplying data. Note this is not used by SkySurfaceFactory, but client UI code may find it useful in conjunction with VIEWSYS_KEY.
      • GRID_KEY

        public static final ConfigKey<java.lang.Boolean> GRID_KEY
        Config key to determine whether grid lines are drawn.
      • CROWD_KEY

        public static final ConfigKey<java.lang.Double> CROWD_KEY
        Config key to control tick mark crowding.
      • AXISLABELLER_KEY

        public static final ConfigKey<SkyAxisLabeller> AXISLABELLER_KEY
        Config key to control axis label positioning.
      • SCALEBAR_KEY

        public static final ConfigKey<java.lang.Boolean> SCALEBAR_KEY
      • SEX_KEY

        public static final ConfigKey<java.lang.Boolean> SEX_KEY
        Config key to determine whether sexagesimal coordinates are used.
      • LON_KEY

        public static final ConfigKey<java.lang.Double> LON_KEY
        Config key for specifying aspect central longitude, in degrees.
      • LAT_KEY

        public static final ConfigKey<java.lang.Double> LAT_KEY
        Config key for specifying aspect central latitude, in degrees.
      • FOV_RADIUS_KEY

        public static final ConfigKey<java.lang.Double> FOV_RADIUS_KEY
        Config key for specifying aspect field of view, in degrees.
    • Constructor Detail

      • SkySurfaceFactory

        public SkySurfaceFactory()
    • Method Detail

      • useRanges

        public boolean useRanges​(SkySurfaceFactory.Profile profile,
                                 ConfigMap config)
        Description copied from interface: SurfaceFactory
        Indicates whether ranges should be provided to generate an aspect. If true, it is beneficial to pass the result of readRanges to createAspect alongside the arguments of this method. If false, any such ranges will be ignored.
        Specified by:
        useRanges in interface SurfaceFactory<SkySurfaceFactory.Profile,​SkyAspect>
        Parameters:
        profile - surface configuration profile
        config - configuration map that may contain keys from getAspectKeys
        Returns:
        true iff calculated ranges will be of use
      • getAspectConfig

        public ConfigMap getAspectConfig​(Surface surf)
        Description copied from interface: SurfaceFactory
        Returns a ConfigMap that corresponds to the configuration of the given surface, which must have been created by this factory. The intention is that supplying the returned config items to this object's createAspect method with the right profile should come up with approximately the same surface, preferably without reference to any supplied ranges.

        The returned config items should be optimised for presentation to the user, so that for instance decimal values are reported to a reasonable level of precision. Because of this, and perhaps for other reasons related to implementation, a surface resulting from feeding the returned config back to this factory may not be identical to the supplied surface, so round-tripping is not guaranteed to be exact.

        Specified by:
        getAspectConfig in interface SurfaceFactory<SkySurfaceFactory.Profile,​SkyAspect>
        Parameters:
        surf - plot surface; if it was not created by this factory, behaviour is undefined
        Returns:
        config map populated with items that should approximately reproduce the supplied surface
      • isAllSky

        public static boolean isAllSky​(Range[] vxyzRanges)
        Determines whether a set of ranges of normalised data coordinates cover enough of the full data cube (-1..+1 in each dimension) to count as full sky coverage. It's a bit arbitrary what this means, but in case of full sky the view should not be centred on any particular position.
        Parameters:
        vxyzRanges - 3-element array giving data ranges for normalised X,Y,Z coordinates
        Returns:
        true if they cover most of the sky