public class SkySurfaceFactory extends Object implements SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>
| Modifier and Type | Class and Description |
|---|---|
static class |
SkySurfaceFactory.Profile
Profile class which defines fixed configuration items for a SkySurface.
|
| Modifier and Type | Field and Description |
|---|---|
static ConfigKey<SkyAxisLabeller> |
AXISLABELLER_KEY
Config key to control axis label positioning.
|
static ConfigKey<Double> |
CROWD_KEY
Config key to control tick mark crowding.
|
static ConfigKey<SkySys> |
DATASYS_KEY
Config key for the sky system used for supplying data.
|
static ConfigKey<Double> |
FOV_RADIUS_KEY
Config key for specifying aspect field of view, in degrees.
|
static ConfigKey<Boolean> |
GRID_KEY
Config key to determine whether grid lines are drawn.
|
static ConfigKey<Double> |
LAT_KEY
Config key for specifying aspect central latitude, in degrees.
|
static ConfigKey<Double> |
LON_KEY
Config key for specifying aspect central longitude, in degrees.
|
static ConfigKey<Projection> |
PROJECTION_KEY
Config key for sky projection type.
|
static ConfigKey<Boolean> |
REFLECT_KEY
Config key to determine whether longitude runs right to left.
|
static ConfigKey<Boolean> |
SCALEBAR_KEY |
static ConfigKey<Boolean> |
SEX_KEY
Config key to determine whether sexagesimal coordinates are used.
|
static ConfigKey<SkySys> |
VIEWSYS_KEY
Config key for the sky system used for projecting the data.
|
| Constructor and Description |
|---|
SkySurfaceFactory() |
| Modifier and Type | Method and Description |
|---|---|
SkyAspect |
createAspect(SkySurfaceFactory.Profile profile,
ConfigMap config,
Range[] ranges)
Creates an aspect from configuration information.
|
Navigator<SkyAspect> |
createNavigator(ConfigMap navConfig)
Creates a navigator from configuration information.
|
SkySurfaceFactory.Profile |
createProfile(ConfigMap config)
Creates a profile that can be used when creating a plot surface.
|
Surface |
createSurface(Rectangle plotBounds,
SkySurfaceFactory.Profile p,
SkyAspect aspect)
Returns a new plot surface.
|
ConfigMap |
getAspectConfig(Surface surf)
Returns a ConfigMap that corresponds to the configuration of
the given surface, which must have been created by this factory.
|
ConfigKey<?>[] |
getAspectKeys()
Returns the configuration keys that may be used to configure aspect
for this surface factory.
|
ConfigKey<?>[] |
getNavigatorKeys()
Returns the configuration keys that may be used to configure
a navigator for use with this surface factory.
|
PlotMetric |
getPlotMetric()
Returns an object that can assess distances between graphic
positions on the plot surface.
|
ConfigKey<?>[] |
getProfileKeys()
Returns the configuration keys used to configure profile for this
surface factory.
|
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.
|
Range[] |
readRanges(SkySurfaceFactory.Profile profile,
PlotLayer[] layers,
DataStore dataStore)
Provides the ranges that may be passed to
createAspect. |
boolean |
useRanges(SkySurfaceFactory.Profile profile,
ConfigMap config)
Indicates whether ranges should be provided to generate an aspect.
|
public static final ConfigKey<Projection> PROJECTION_KEY
public static final ConfigKey<Boolean> REFLECT_KEY
public static final ConfigKey<SkySys> VIEWSYS_KEY
public static final ConfigKey<SkySys> DATASYS_KEY
VIEWSYS_KEY.public static final ConfigKey<Boolean> GRID_KEY
public static final ConfigKey<SkyAxisLabeller> AXISLABELLER_KEY
public static final ConfigKey<Boolean> SEX_KEY
public static final ConfigKey<Double> LON_KEY
public static final ConfigKey<Double> LAT_KEY
public Surface createSurface(Rectangle plotBounds, SkySurfaceFactory.Profile p, SkyAspect aspect)
SurfaceFactorycreateSurface in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>plotBounds - rectangle to containing actual plot data
(not insets)p - configuration object defining plot styleaspect - configuration object defining plot viewpointpublic ConfigKey<?>[] getProfileKeys()
SurfaceFactorycreateProfile method.getProfileKeys in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>public SkySurfaceFactory.Profile createProfile(ConfigMap config)
SurfaceFactorygetProfileKeys.
The return value can be used as input to
createSurface and other methods in this class.createProfile in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>config - map of profile configuration itemspublic ConfigKey<?>[] getAspectKeys()
SurfaceFactoryuseRanges and
createAspect methods.getAspectKeys in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>public boolean useRanges(SkySurfaceFactory.Profile profile, ConfigMap config)
SurfaceFactoryreadRanges to createAspect
alongside the arguments of this method.
If false, any such ranges will be ignored.useRanges in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>profile - surface configuration profileconfig - configuration map that may contain keys from
getAspectKeyspublic SkyAspect createAspect(SkySurfaceFactory.Profile profile, ConfigMap config, Range[] ranges)
SurfaceFactoryuseRanges
returns true.
It is legal to give the ranges argument as null in any case.
In all cases, the returned value must be non-null and usable by
createSurface.createAspect in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>profile - surface configuration profileconfig - configuration map that may contain keys from
getAspectKeysranges - range data filled in from layers, or nullpublic ConfigMap getAspectConfig(Surface surf)
SurfaceFactorycreateAspect 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.
getAspectConfig in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>surf - plot surface; if it was not created by this factory,
behaviour is undefinedpublic Range[] readRanges(SkySurfaceFactory.Profile profile, PlotLayer[] layers, DataStore dataStore)
SurfaceFactorycreateAspect.
There is only any point calling this if useRanges
returns true.readRanges in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>profile - surface configuration profilelayers - plot layers to be plotteddataStore - contains actual datapublic ConfigKey<?>[] getNavigatorKeys()
SurfaceFactorySurfaceFactory.createNavigator(uk.ac.starlink.ttools.plot2.config.ConfigMap) method.getNavigatorKeys in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>public Navigator<SkyAspect> createNavigator(ConfigMap navConfig)
SurfaceFactorycreateNavigator in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>navConfig - configuration map that may contain keys from
getNavigatorKeyspublic PlotMetric getPlotMetric()
SurfaceFactorygetPlotMetric in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>public static boolean isAllSky(Range[] vxyzRanges)
vxyzRanges - 3-element array giving data ranges for normalised
X,Y,Z coordinatesCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.