HiRISE

HiRISE.HiPlan.Shapes
Class Planned_Observations

java.lang.Object
  extended by HiRISE.HiPlan.Shapes.Planned_Observations
All Implemented Interfaces:
edu.asu.jmars.layer.util.features.FeatureProvider, Observation_Fields

public class Planned_Observations
extends Object
implements edu.asu.jmars.layer.util.features.FeatureProvider, Observation_Fields

A simple feature provider for HiRISE observations as cataloged in HiCat. These observations are stored in the Planned_Observations table; they may or may not have already been acquired. The value of the Observation_Fields.STATUS field indicates whether they have been so acquired yet.

This provider pops a dialog for limiting the selection of observations by the STATUS field.

Database configuration information is taken from the user's environment via the Constants.CONFIGURATION_PROPERTY system property, which names a file to be used. If there is a problem with the configuration or with the database connection, provider reports this fact to the operator.

Features from this provider cannot be saved as properly formed MRO ROIs as per the MRO Region of Interest Software Interface Specification. They can be saved, but the resulting file will not include the required fields.

Coordinates: The HiRISE planned observation dataset is either planetographic or planetocentric; both latitudes are provided. The longitude is east-leading. The shape layer takes planetocentric, west-leading data, so the longitude data are converted to west-leading and the planetocentric latitudes are taken.

Version:
1.38
Author:
Christian Schaller - UA/PIRL

Nested Class Summary
static class Planned_Observations.QueryOption
           
 
Field Summary
static String DATABASE_FACTORY_ID
          The name of the optional configuration parameter to hold a unique ID for the planned observations feature provider's database object.
static String DEFAULT_DATABASE_FACTORY_ID
          The default database factory ID for the planned observations feature provider.
static boolean DEFAULT_EXCLUDE_GEOMETRY_PROCESSED
          The default value for the "exclude geometry-processed observations" flag.
static boolean DEFAULT_INCLUDE_GEOMETRY_OUTLINES
          The default value for the "include geometry outlines" flag.
static boolean DEFAULT_INCLUDE_MARS_TARGETS_ONLY
          The default value for the "include Mars targets only" flag.
static Planned_Observations.QueryOption DEFAULT_QUERY_OPTION
           
static String[] DEFAULT_QUERY_STATUS_VALUES
          The default list of status values to be loaded in a query-by-status operation.
static String EXCLUDE_GEOMETRY_PROCESSED
          The name of the configuration parameter holding the flag to exclude geometry-processed observations.
static String ID
          Class identification name with source code version and date.
static String INCLUDE_GEOMETRY_OUTLINES
          The name of the configuration parameter holding the flag to include geometry outlines in the query.
static String INCLUDE_MARS_TARGETS_ONLY
          The name of the configuration parameter holding the flag to include only Mars targets in the query.
static String QUERY_OPTION
           
static String QUERY_STATUS_VALUES
          The name of the configuration parameter holding the list of status values to be loaded in a query-by-status operation.
static String SERVICE_DESCRIPTION
           
 
Fields inherited from interface HiRISE.HiPlan.HiCat.Observation_Fields
ALTITUDE, ANCILLARY_DATA, ASCENDING_PASS, CALIBRATION, CENTER_LONGITUDE, CENTER_PLANETOCENTRIC_LATITUDE, CENTER_PLANETOGRAPHIC_LATITUDE, COMMAND_FILE_ASP_RECEIPT_TIME, COMMAND_FILE_DOM_RECEIPT_TIME, COMMAND_FILE_GENERATION_TIME, COMMAND_FILE_MRO_UPLINK_TIME, COMMAND_FILE_PATHNAME, COMMANDER, COMMENT, COMPLETE, CONTRAST_RATIO, COORDINATED_TRACK_HISTORY, COORDINATION, CPMM_00_ON, CPMM_01_ON, CPMM_02_ON, CPMM_03_ON, CPMM_04_ON, CPMM_05_ON, CPMM_06_ON, CPMM_07_ON, CPMM_08_ON, CPMM_09_ON, CPMM_10_ON, CPMM_11_ON, CPMM_12_ON, CPMM_13_ON, CPMM_POWER_FIELDS, CRC_CHECK, CRISM_COORDINATION, CTX_COORDINATION, DEFAULT_FELICS_COMPRESSION_RATIO, DEFUNCT, DEIMOS, DELAY_BY, DESCENDING_PASS, DUST, END_PLANETOCENTRIC_LATITUDE, END_PLANETOGRAPHIC_LATITUDE, ESTIMATED_EMISSION_ANGLE, ESTIMATED_INCIDENCE_ANGLE, ESTIMATED_PHASE_ANGLE, ESTIMATED_RECEIVE_TIME, ESTIMATED_ROLL_ANGLE, EXECUTED, FELICS_COMPRESSION_FLAG, FELICS_COMPRESSION_RATIO, FOOTPRINT_PLANETOCENTRIC_VERTICES, FOOTPRINT_PLANETOGRAPHIC_VERTICES, FROST_ALBEDO, FROST_COVER, HELIOCENTRIC_DISTANCE, HIGH_STABILITY, HIGH_STABILITY_LARGE_ROLL, HIGH_STABILITY_NADIR, HIGH_STABILITY_SMALL_ROLL, HISTORY, ICE, IMAGE_WIDTH, INCOMPLETE, INSTRUMENT_SET, KA_BAND_PLAYBACK, KEEP_STIM_LAMPS_ON_FLAG, LAST_UPDATE, LSUBS, LUNA, LUT_SELECTOR_BG_FUDGE_FACTOR, LUT_SELECTOR_IR_FUDGE_FACTOR, LUT_SELECTOR_RED_FUDGE_FACTOR, MANUAL_DELAY_BY_FLAG, MARS, MINIMUM_SETUP_DURATIONS, MOON, NO, NOOP, NOPROC, NORMAL_STABILITY, NORMAL_STABILITY_LARGE_ROLL, NORMAL_STABILITY_NADIR, NORMAL_STABILITY_SMALL_ROLL, NOTES, OBSERVATION_DURATION, OBSERVATION_ID, OBSERVATION_TYPE, OFF, OFFSET_CENTER_ALTITUDE, OFFSET_CENTER_LONGITUDE, OFFSET_CENTER_PLANETOCENTRIC_LATITUDE, OFFSET_CENTER_PLANETOGRAPHIC_LATITUDE, ON, OPTICAL_DEPTH, ORBIT_ALTERNATIVES, ORBIT_NUMBER, ORBIT_PASS, OTHER_COORDINATION, PHOBOS, PI_APPROVAL_TO_RELEASE_FLAG, PLANNED, PLANNED_OBSERVATIONS_TABLE, PLANNER, PLAYBACK_MODE, PREDICT_TIME, RAW_DATA_VOLUME_BYTES, RELATIONAL_DATA, RELATIVE_TIMED_SEQUENCE_FLAG, REQUEST_CATEGORY, REQUEST_PRIORITY, REQUESTED, SCAN_EXPOSURE_DURATION, SCATTERING_SOURCE, SCATTERING_SOURCES, SCMF, SEQUENCE_ID, SETUP_DURATION, SKY, SPARE_3, STABILITY, STARS, START_PLANETOCENTRIC_LATITUDE, START_PLANETOGRAPHIC_LATITUDE, STATUS, STATUSES, STIMULATION_LAMP_BLG_ON, STIMULATION_LAMP_NIR_ON, STIMULATION_LAMP_POWER_FIELDS, STIMULATION_LAMP_RED_ON, SUCCESS_ACQUIRED_TIME, SURFACE_ROUGHNESS, SURFACE_TYPE, TARGET_NAME, TARGET_NAMES, X_BAND_PLAYBACK, YES
 
Constructor Summary
Planned_Observations()
          Creates a new feature provider for planned HiRISE observations.
 
Method Summary
 String getDescription()
          Gets a description of this feature provider.
 File[] getExistingSaveToFiles(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection, String baseName)
          Gets the names of the files output by a save with the given base name and feature collection.
 String getExtension()
          Gets the file extension.
 boolean isFileBased()
          Tests whether this provider pulls data from a file.
 boolean isRepresentable(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection)
          Tests whether the given can be completely represented in the source format of this provider.
 edu.asu.jmars.layer.util.features.FeatureCollection load(String filename)
          Gets a new feature collection containing data from the provider's database.
 int save(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection, String filename)
          Writes the specified features to source the feature provider was constructed from.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values

SERVICE_DESCRIPTION

public static final String SERVICE_DESCRIPTION
See Also:
Constant Field Values

DATABASE_FACTORY_ID

public static final String DATABASE_FACTORY_ID
The name of the optional configuration parameter to hold a unique ID for the planned observations feature provider's database object. The parameter is expected to be found in the Constants.APPLICATION_GROUP (Shapes).

The ID is used in the DatabaseFactory.getInstance(Configuration,String) method. If this parameter is not specified, DEFAULT_DATABASE_FACTORY_ID will be used; each of the shape layer feature providers that uses the database uses its own such ID, resulting in each provider using its own connection. The parameters can be tweaked in the user's configuration should sharing a connection be desired.

Parameter name: Planned_Observations_DBF_ID.

See Also:
Constant Field Values

DEFAULT_DATABASE_FACTORY_ID

public static final String DEFAULT_DATABASE_FACTORY_ID
The default database factory ID for the planned observations feature provider.

Value: Shapes.Planned_Observations.

See Also:
DATABASE_FACTORY_ID, Constant Field Values

QUERY_STATUS_VALUES

public static final String QUERY_STATUS_VALUES
The name of the configuration parameter holding the list of status values to be loaded in a query-by-status operation. Their respective checkboxes in the selection panel will be checked whenever this feature provider is constructed.

See Also:
Constant Field Values

DEFAULT_QUERY_STATUS_VALUES

public static final String[] DEFAULT_QUERY_STATUS_VALUES
The default list of status values to be loaded in a query-by-status operation.


EXCLUDE_GEOMETRY_PROCESSED

public static final String EXCLUDE_GEOMETRY_PROCESSED
The name of the configuration parameter holding the flag to exclude geometry-processed observations. The query panel's corresponding checkbox is checked or unchecked at construction based on this parameter.

See Also:
Constant Field Values

DEFAULT_EXCLUDE_GEOMETRY_PROCESSED

public static final boolean DEFAULT_EXCLUDE_GEOMETRY_PROCESSED
The default value for the "exclude geometry-processed observations" flag.

See Also:
Constant Field Values

INCLUDE_MARS_TARGETS_ONLY

public static final String INCLUDE_MARS_TARGETS_ONLY
The name of the configuration parameter holding the flag to include only Mars targets in the query. The query panel's corresponding checkbox is checked or unchecked at construction based on this parameter.

See Also:
Constant Field Values

DEFAULT_INCLUDE_MARS_TARGETS_ONLY

public static final boolean DEFAULT_INCLUDE_MARS_TARGETS_ONLY
The default value for the "include Mars targets only" flag.

See Also:
Constant Field Values

INCLUDE_GEOMETRY_OUTLINES

public static final String INCLUDE_GEOMETRY_OUTLINES
The name of the configuration parameter holding the flag to include geometry outlines in the query. These outlines are taken from the so-called "planned geometry" fields of the Planned_Observations table. The query panel's corresponding checkbox is checked or unchecked at construction based on this parameter.

See Also:
Constant Field Values

DEFAULT_INCLUDE_GEOMETRY_OUTLINES

public static final boolean DEFAULT_INCLUDE_GEOMETRY_OUTLINES
The default value for the "include geometry outlines" flag.

See Also:
Constant Field Values

QUERY_OPTION

public static final String QUERY_OPTION
See Also:
Constant Field Values

DEFAULT_QUERY_OPTION

public static final Planned_Observations.QueryOption DEFAULT_QUERY_OPTION
Constructor Detail

Planned_Observations

public Planned_Observations()
Creates a new feature provider for planned HiRISE observations.

Method Detail

getDescription

public String getDescription()
Gets a description of this feature provider. This value appears in the Shape layer's menu.

Specified by:
getDescription in interface edu.asu.jmars.layer.util.features.FeatureProvider
Returns:
"Planned HiRISE Observations"

getExistingSaveToFiles

public File[] getExistingSaveToFiles(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection,
                                     String baseName)
Gets the names of the files output by a save with the given base name and feature collection.

Specified by:
getExistingSaveToFiles in interface edu.asu.jmars.layer.util.features.FeatureProvider
Parameters:
featureCollection - the feature collection in question.
baseName - the base name in question.
Returns:
the names of the output files.

getExtension

public String getExtension()
Gets the file extension. Since this provider pulls data from a database rather than from a file, there is no file extension.

Specified by:
getExtension in interface edu.asu.jmars.layer.util.features.FeatureProvider
Returns:
null.

isFileBased

public boolean isFileBased()
Tests whether this provider pulls data from a file. This provider does not.

Specified by:
isFileBased in interface edu.asu.jmars.layer.util.features.FeatureProvider
Returns:
false.

isRepresentable

public boolean isRepresentable(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection)
Tests whether the given can be completely represented in the source format of this provider.

Specified by:
isRepresentable in interface edu.asu.jmars.layer.util.features.FeatureProvider
Parameters:
featureCollection - the collection to be tested.
Returns:
false.

load

public edu.asu.jmars.layer.util.features.FeatureCollection load(String filename)
Gets a new feature collection containing data from the provider's database. This method pops a confirmation dialog containing a set of controls for the parameters of the database query; if the dialog is canceled, this method returns an empty collection. If there was a problem with the configuration or with the database connection during construction of this provider, this method returns an empty collection.

Specified by:
load in interface edu.asu.jmars.layer.util.features.FeatureProvider
Parameters:
filename - unused, but required by the interface.
Returns:
a new single feature collection, which may be empty.

save

public int save(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection,
                String filename)
Writes the specified features to source the feature provider was constructed from. This method is unsupported, so an UnsupportedOperationException is thrown if this method is called.

Specified by:
save in interface edu.asu.jmars.layer.util.features.FeatureProvider
Parameters:
featureCollection - the collection of features in question.
filename - a filename.
Returns:
the number of features saved.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona