HiRISE

HiRISE.HiCat.Utilities
Class Loaded_Database

java.lang.Object
  extended by HiRISE.HiCat.Utilities.Loaded_Database

public class Loaded_Database
extends Object

Loaded_Database This class defines the necessary operations to make certain that data loaded from a database is valid.

This class will attempt to make certain that there is consistency between the specified fields and the data entries. It attempts to make certain that there all entries have the same size as the number of fields. It also tries to make sure that the fields match with what should be there as specified by the Unique Key and the Required Fields. Other than that it is lenient in what can be put into it.

As a note, while attempting to keep consistency between the fields and the entries this class only makes sure that the entry size is only at least the size of the list of fields. If there are more fields filled in an entry than there are fields in the database the data will be kept intact. As a rule the fields of this class should be filled out before anything else, but it is possible to fill the data in first. However, take caution when removing fields as the corresponding column will be removed from the data entries.

This class also includes the ability to define a null value for each field. Then, when inserting entries each value in each entry will be checked against the null value for the field that it represents. If the values match then the value in the entry will be set to null. This comparison is case sensitive.

All field comparisons in this class are case sensitive.

The Unique Key field should be specified after the fields have been filled. This is because the key will only be set if it exists in the list of fields.

Required fields are loaded into this class any time a change occurs with the configuration. Required fields are optional in the configuration file and should be specified in the required fields group in the configuration group for this class. Below is an example Configuration file.

   Group = Loaded_Database
      Group = Required_Fields
         Product_ID
         Center
         Footprint
      End_Group
   End_Group

Version:
1.3
Author:
Sean Whitsitt - UA/PIRL
See Also:
PIRL.Configuration

Field Summary
protected  Vector<String> Altered_Fields_From
          The list of altered field names in the external database
protected  String Altered_Fields_Group
          The group for finding Altered Fields
protected  Vector<String> Altered_Fields_To
          The list of altered field names in the local database
protected  int Base
          The base for configuration fields
protected  String Column_Number_Pathname
          The column number pathname
protected  Configuration Config
          The Configuration file for this class.
protected  String Config_Group
          The group to gather configuration information from for this class.
protected  Vector<Vector<String>> Data
          The data from the database.
static String DEFAULT_ALTERED_FIELDS_GROUP
          The default group for finding Altered Fields
static int DEFAULT_BASE
          The default base for configuration fields
static String DEFAULT_COLUMN_NUMBER_PATHNAME
          The default column number pathname
static String DEFAULT_CONFIG_FILENAME
          The default name for the configuration file.
static String DEFAULT_CONFIG_GROUP
          The default group to gather configuration information from for this class if no other group is specified.
static String DEFAULT_EXCLUDED_FIELDS_GROUP
          The default group for finding Excluded Fields
static String DEFAULT_FIELD_NAME_PATHNAME
          The default field name pathname.
static String DEFAULT_FIELD_PATHNAME
          The default field pathname.
static String DEFAULT_NULL_VALUE_PATHNAME
          The default null values pathname
static String DEFAULT_REQUIRED_FIELDS_GROUP
          The default group for finding required fields if no other group is specified.
static String DEFAULT_UNIQUE_KEY_PATHNAME
          The default Unique key pathname
protected  Vector<Integer> Excluded_Field_Numbers
          The field numbers for excluded fields
protected  Vector<String> Excluded_Fields
          The list of excluded fields
protected  String Excluded_Fields_Group
          The group for finding Excluded Fields
protected  String Field_Name_Pathname
          The field name pathname
protected  String Field_Pathname
          The configuration pathname for fields
protected  Vector<String> Fields
          The field names from the database.
static String ID
          The Class identification with revision number.
protected  String Null_Value_Pathname
          The null values pathname
protected  Vector<String> Null_Values
          A list of null values for the fields
protected  Vector<String> Required_Fields
          A list of field names that are required by the program using this database.
protected  String Required_Fields_Group
          The group to gather required fields from within the main group.
protected  String Unique_Key
          The name of the unique key field for this database.
protected  String Unique_Key_Pathname
          The Unique key pathname
 
Constructor Summary
Loaded_Database()
          This creates a Loaded_Database with all default values.
Loaded_Database(Configuration config)
          This creates a Loaded_Database with a configuration object and a default config group
Loaded_Database(Configuration config, String config_group)
          This creates a Loaded_Database with a configuration from an object and a non-default config_group
Loaded_Database(String config_filename)
          This creates a Loaded_Database with a configuration from a file name and a default config group
Loaded_Database(String config_filename, String config_group)
          This creates a Loaded_Database with a configuration from a file and a non-default config_group
 
Method Summary
 void Add_Entry(Vector<String> entry)
          This method adds an entry to the data of the Loaded_Database
 boolean Add_Field(int index, String field, String null_value)
          This adds a field to the list of fields and a null value at a specified index.
 boolean Add_Field(String field)
          This adds a field to the list of fields and sets the null value for that field to null.
 boolean Add_Field(String field, boolean force)
          This allows a field to be forcefully added
 boolean Add_Field(String field, String null_value)
          This adds a field to the list of fields and a null value
 void Add_Fields(Vector<String> fields)
          This adds a bunch of fields to the list of fields and sets the null value for each field to null.
 void Add_Fields(Vector<String> fields, Vector<String> null_values)
          This adds a bunch of fields to the list of fields and a their cooresponding null values.
 void Clear_Data()
          This clears the data from the data set.
 void Clear_Fields()
          This clears out both the fields and the data
static String Create_180180_WKT_Centroid_Point(String x, String y)
          This returns a WKT center point based on Strings and converts them to the 180,-180 longitude domain.
static String Create_180180_WKT_ROI_Polygon_From_Strings(Vector<Vector<String>> points)
          This returns a WKT polygon based on a Vector of Vectors of Strings that is in the 180,-180 longitude format.
static String Create_WKT_Centroid_Point(double x, double y)
          This returns a WKT center point based on doubles
static String Create_WKT_Centroid_Point(String x, String y)
          This returns a WKT center point based on Strings
static String Create_WKT_ROI_Polygon_From_Doubles(Vector<Vector<Double>> points)
          This returns a WKT polygon based on a Vector of Vectors of doubles
static String Create_WKT_ROI_Polygon_From_Strings(Vector<Vector<String>> points)
          This returns a WKT polygon based on a Vector of Vectors of Strings
 void Fill_Fields(Parameter config)
          This uses a Parameter to fill out the fields
 void Fill_Fields(String url)
          This uses a PVL parameter file stored at a URL to fill out the fields
 String Get_Altered_Fields_Group()
          This returns the Vector of Strings of altered fields
 int Get_Base()
          This gets the base for the field numbers
 String Get_Column_Number_Pathname()
          This gets the column number pathname
 String Get_Configuration_Group()
          This gets the configuration group for this class
 Configuration Get_Configuration()
          This gets the configuration for this class
 Vector<Vector<String>> Get_Data()
          This returns a copy of the data in the Loaded_Database
 Vector<Integer> Get_Excluded_Field_Numbers()
          This gets the field numbers for excluded fields
 String Get_Excluded_Fields_Group()
          This returns the Vector of Strings of excluded fields
 String Get_Field_Name_Pathname()
          This gets the field name pathname
 String Get_Field_Pathname()
          This gets the field pathname
 Vector<String> Get_Fields()
          This returns a list of the fields
 String Get_Key()
           
 String Get_Null_Value_Pathname()
          This gets the null values pathname
 String Get_Required_Fields_Group()
          This returns the Vector of Strings of required fields
 String Get_Unique_Key_Pathname()
          This gets the Unique key pathname
 int Number_Of_Fields()
          This returns the number of fields
 Vector<Vector<String>> Remove_Data()
          This removes and returns the data from the data set.
 void Remove_Entry(int entry)
          This method removes an entry from a specified location
 void Remove_Entry(String key)
          This method removes an entry based on its unique key
 void Remove_Field(String field)
          This removes a field from the list if it is there.
 void Remove_Fields(Vector<String> fields)
          This removes a bunch of fields from the list of fields if they are there
 void Set_Altered_Fields_Group(String altered_fields_group)
          This sets the group that the altered fields should be taken from.
 void Set_Base(int base)
          This sets the base for the field numbers
 void Set_Column_Number_Pathname(String path)
          This sets the column number pathname
 void Set_Configuration_Group(String config_group)
          This sets the configuration group for this class
 void Set_Configuration(Configuration config)
          This sets the configuration based on a configuration object
 void Set_Configuration(String config_filename)
          This sets the classes configuration based on a filename
 void Set_Excluded_Fields_Group(String excluded_fields_group)
          This sets the group that the excluded fields should be taken from.
 void Set_Field_Name_Pathname(String path)
          This sets the field name pathname
 void Set_Field_Pathname(String path)
          This sets the field pathname
 void Set_Key(String key)
          This method sets the unique key string
 void Set_Null_Value_Pathname(String path)
          This sets the null values pathname
 void Set_Required_Fields_Group(String required_fields_group)
          This sets the group that the required fields should be taken from.
 void Set_Unique_Key_Pathname(String path)
          This sets the Unique key pathname
 int Size()
          This returns the size of the data set
 boolean Validate()
          This method validates the loaded database.
 
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
The Class identification with revision number.

See Also:
Constant Field Values

Config

protected Configuration Config
The Configuration file for this class.


DEFAULT_CONFIG_FILENAME

public static final String DEFAULT_CONFIG_FILENAME
The default name for the configuration file.

See Also:
Constant Field Values

Config_Group

protected String Config_Group
The group to gather configuration information from for this class.


DEFAULT_CONFIG_GROUP

public static final String DEFAULT_CONFIG_GROUP
The default group to gather configuration information from for this class if no other group is specified.

See Also:
Constant Field Values

Required_Fields_Group

protected String Required_Fields_Group
The group to gather required fields from within the main group.


DEFAULT_REQUIRED_FIELDS_GROUP

public static final String DEFAULT_REQUIRED_FIELDS_GROUP
The default group for finding required fields if no other group is specified.

See Also:
Constant Field Values

Data

protected Vector<Vector<String>> Data
The data from the database.


Fields

protected Vector<String> Fields
The field names from the database.


Unique_Key

protected String Unique_Key
The name of the unique key field for this database.


Required_Fields

protected Vector<String> Required_Fields
A list of field names that are required by the program using this database.


Null_Values

protected Vector<String> Null_Values
A list of null values for the fields


Null_Value_Pathname

protected String Null_Value_Pathname
The null values pathname


Excluded_Fields

protected Vector<String> Excluded_Fields
The list of excluded fields


Excluded_Fields_Group

protected String Excluded_Fields_Group
The group for finding Excluded Fields


Excluded_Field_Numbers

protected Vector<Integer> Excluded_Field_Numbers
The field numbers for excluded fields


DEFAULT_EXCLUDED_FIELDS_GROUP

public static final String DEFAULT_EXCLUDED_FIELDS_GROUP
The default group for finding Excluded Fields

See Also:
Constant Field Values

Altered_Fields_From

protected Vector<String> Altered_Fields_From
The list of altered field names in the external database


Altered_Fields_To

protected Vector<String> Altered_Fields_To
The list of altered field names in the local database


Altered_Fields_Group

protected String Altered_Fields_Group
The group for finding Altered Fields


DEFAULT_ALTERED_FIELDS_GROUP

public static final String DEFAULT_ALTERED_FIELDS_GROUP
The default group for finding Altered Fields

See Also:
Constant Field Values

DEFAULT_NULL_VALUE_PATHNAME

public static final String DEFAULT_NULL_VALUE_PATHNAME
The default null values pathname

See Also:
Constant Field Values

Field_Pathname

protected String Field_Pathname
The configuration pathname for fields


DEFAULT_FIELD_PATHNAME

public static final String DEFAULT_FIELD_PATHNAME
The default field pathname.

See Also:
Constant Field Values

Field_Name_Pathname

protected String Field_Name_Pathname
The field name pathname


DEFAULT_FIELD_NAME_PATHNAME

public static final String DEFAULT_FIELD_NAME_PATHNAME
The default field name pathname.

See Also:
Constant Field Values

Column_Number_Pathname

protected String Column_Number_Pathname
The column number pathname


DEFAULT_COLUMN_NUMBER_PATHNAME

public static final String DEFAULT_COLUMN_NUMBER_PATHNAME
The default column number pathname

See Also:
Constant Field Values

Unique_Key_Pathname

protected String Unique_Key_Pathname
The Unique key pathname


DEFAULT_UNIQUE_KEY_PATHNAME

public static final String DEFAULT_UNIQUE_KEY_PATHNAME
The default Unique key pathname

See Also:
Constant Field Values

Base

protected int Base
The base for configuration fields


DEFAULT_BASE

public static final int DEFAULT_BASE
The default base for configuration fields

See Also:
Constant Field Values
Constructor Detail

Loaded_Database

public Loaded_Database()
                throws Configuration_Exception
This creates a Loaded_Database with all default values.

Throws:
Configuration_Exception - Thrown when the creation of the configuration fails.

Loaded_Database

public Loaded_Database(Configuration config)
This creates a Loaded_Database with a configuration object and a default config group

Parameters:
config - The configuration object.

Loaded_Database

public Loaded_Database(String config_filename)
                throws Configuration_Exception
This creates a Loaded_Database with a configuration from a file name and a default config group

Parameters:
config_filename - The name of the configuration file.
Throws:
Configuration_Exception - Thrown when the creation of the configuration fails.

Loaded_Database

public Loaded_Database(Configuration config,
                       String config_group)
This creates a Loaded_Database with a configuration from an object and a non-default config_group

Parameters:
config - The configuration object
config_group - The name of the config group

Loaded_Database

public Loaded_Database(String config_filename,
                       String config_group)
                throws Configuration_Exception
This creates a Loaded_Database with a configuration from a file and a non-default config_group

Parameters:
config_filename - the name of the configuration file.
config_group - the name of the config group.
Throws:
Configuration_Exception
Method Detail

Set_Configuration

public void Set_Configuration(Configuration config)
This sets the configuration based on a configuration object

This also re-obtains the required fields with the new information.

Parameters:
config - The new configuration object.

Set_Configuration

public void Set_Configuration(String config_filename)
                       throws Configuration_Exception
This sets the classes configuration based on a filename

This also re-obtains the required fields with the new information.

Parameters:
config_filename - The name of the new configuration file
Throws:
Configuration_Exception

Get_Configuration

public Configuration Get_Configuration()
This gets the configuration for this class

Returns:
the classes configuration.

Set_Configuration_Group

public void Set_Configuration_Group(String config_group)
This sets the configuration group for this class

This also re-obtains the required fields with the new information.

Parameters:
config_group - The configuration group name.

Get_Configuration_Group

public String Get_Configuration_Group()
This gets the configuration group for this class

Returns:
The configuration group for this class

Set_Required_Fields_Group

public void Set_Required_Fields_Group(String required_fields_group)
This sets the group that the required fields should be taken from.

The group is the group within the configuration file that the required fields are listed in. This also re-obtains those fields with the new information.

Parameters:
required_fields_group - The name of the group.

Get_Required_Fields_Group

public String Get_Required_Fields_Group()
This returns the Vector of Strings of required fields

Returns:
The Required Fields

Set_Excluded_Fields_Group

public void Set_Excluded_Fields_Group(String excluded_fields_group)
This sets the group that the excluded fields should be taken from.

The group is the group within the configuration file that the excluded fields are listed in. This also re-obtains those fields with the new information.

Parameters:
excluded_fields_group - The name of the group.

Get_Excluded_Fields_Group

public String Get_Excluded_Fields_Group()
This returns the Vector of Strings of excluded fields

Returns:
The Excluded Fields

Set_Altered_Fields_Group

public void Set_Altered_Fields_Group(String altered_fields_group)
This sets the group that the altered fields should be taken from.

The group is the group within the configuration file that the altered fields are listed in. This also re-obtains those fields with the new information.

Parameters:
altered_fields_group - The name of the group.

Get_Altered_Fields_Group

public String Get_Altered_Fields_Group()
This returns the Vector of Strings of altered fields

Returns:
The Altered Fields

Validate

public boolean Validate()
This method validates the loaded database.

All rules must be met for data to be valid.
   First rule: a Unique Key must be set and in the Field Vector.
   Second rule: all Strings in the Required_Fields Vector must be in the Field Vector.

All field comparisons are case sensitive.

Returns:
- true if the class has valid data
- false if the class has invalid data

Set_Key

public void Set_Key(String key)
This method sets the unique key string

The key must be in the list of fields, and the comparison is case sensitive.

Parameters:
key - the name of the new unique key.

Get_Key

public String Get_Key()

Add_Entry

public void Add_Entry(Vector<String> entry)
This method adds an entry to the data of the Loaded_Database

The entry is checked against the list of Null Values and if a value is found to contain the value defined as null for that field then it will be set to null.

Parameters:
entry - the entry to add.

Remove_Entry

public void Remove_Entry(int entry)
This method removes an entry from a specified location

Parameters:
entry - the index of the entry to remove

Remove_Entry

public void Remove_Entry(String key)
This method removes an entry based on its unique key

If there is no key this has no effect. If the key is not actually unique then this removes the first instance of it. The comparison to the key is case sensitive.

Parameters:
key - The key to remove.

Get_Data

public Vector<Vector<String>> Get_Data()
This returns a copy of the data in the Loaded_Database

Returns:
A copy of the data.

Size

public int Size()
This returns the size of the data set

Returns:
The number of entries in the data set.

Number_Of_Fields

public int Number_Of_Fields()
This returns the number of fields

Returns:
The number of fields.

Clear_Data

public void Clear_Data()
This clears the data from the data set.


Remove_Data

public Vector<Vector<String>> Remove_Data()
This removes and returns the data from the data set.

Returns:
The data set.

Add_Field

public boolean Add_Field(String field)
This adds a field to the list of fields and sets the null value for that field to null.

Parameters:
field - The field to add

Add_Field

public boolean Add_Field(String field,
                         boolean force)
This allows a field to be forcefully added

Parameters:
field - The field to add
force - true will force the add, false will not

Add_Field

public boolean Add_Field(String field,
                         String null_value)
This adds a field to the list of fields and a null value

Parameters:
field - The field to add
null_value - The null value for that field

Add_Field

public boolean Add_Field(int index,
                         String field,
                         String null_value)
This adds a field to the list of fields and a null value at a specified index.

If the Vectors are not large enough then they are expanded. If the index is below 0 then the values are placed at the end of the Vectors.

Parameters:
index - The index to add these things at
field - The field to add
null_value - The null value for that field

Add_Fields

public void Add_Fields(Vector<String> fields)
This adds a bunch of fields to the list of fields and sets the null value for each field to null.

Parameters:
fields - A Vector of Strings of field names

Add_Fields

public void Add_Fields(Vector<String> fields,
                       Vector<String> null_values)
This adds a bunch of fields to the list of fields and a their cooresponding null values.

If the size of the two Vectors is not the same this has no effect.

Parameters:
fields - A Vector of Strings of field names
null_values - A Vector of Strings of null values

Remove_Field

public void Remove_Field(String field)
This removes a field from the list if it is there.

The corresponding column in the data set is also removed. The comparison is case sensitive.

Parameters:
field - The field to remove

Remove_Fields

public void Remove_Fields(Vector<String> fields)
This removes a bunch of fields from the list of fields if they are there

Parameters:
fields - The list of fields

Clear_Fields

public void Clear_Fields()
This clears out both the fields and the data


Get_Fields

public Vector<String> Get_Fields()
This returns a list of the fields

Returns:
the list of fields.

Set_Null_Value_Pathname

public void Set_Null_Value_Pathname(String path)
This sets the null values pathname

Parameters:
path - The String representation of the pathname

Get_Null_Value_Pathname

public String Get_Null_Value_Pathname()
This gets the null values pathname

Returns:
The null values pathname

Set_Field_Pathname

public void Set_Field_Pathname(String path)
This sets the field pathname

Parameters:
path - The String representation of the pathname

Get_Field_Pathname

public String Get_Field_Pathname()
This gets the field pathname

Returns:
The field pathname

Set_Field_Name_Pathname

public void Set_Field_Name_Pathname(String path)
This sets the field name pathname

Parameters:
path - The String representation of the pathname

Get_Field_Name_Pathname

public String Get_Field_Name_Pathname()
This gets the field name pathname

Returns:
The field name pathname

Set_Column_Number_Pathname

public void Set_Column_Number_Pathname(String path)
This sets the column number pathname

Parameters:
path - The String representation of the pathname

Get_Column_Number_Pathname

public String Get_Column_Number_Pathname()
This gets the column number pathname

Returns:
The column number pathname

Set_Unique_Key_Pathname

public void Set_Unique_Key_Pathname(String path)
This sets the Unique key pathname

Parameters:
path - The String representation of the pathname

Get_Unique_Key_Pathname

public String Get_Unique_Key_Pathname()
This gets the Unique key pathname

Returns:
The Unique key pathname

Set_Base

public void Set_Base(int base)
This sets the base for the field numbers

This base is used when filling fields from a configuration. If the columns in the configuration are 0 indexed the base should be 0. If the columns in the configuration are 1 indexed the base should be 1.

Parameters:
base - The number at which field numbers will start.

Get_Base

public int Get_Base()
This gets the base for the field numbers

Returns:
The base of this class.

Get_Excluded_Field_Numbers

public Vector<Integer> Get_Excluded_Field_Numbers()
This gets the field numbers for excluded fields

Returns:
The vector of excluded fields

Fill_Fields

public void Fill_Fields(String url)
                 throws MalformedURLException,
                        PVL_Exception,
                        IOException
This uses a PVL parameter file stored at a URL to fill out the fields

This makes the URL object then creates a Parameter and passes it to Fill_Fields(PIRL.PVL.Parameter).

Parameters:
url - The String representation of the URL
Throws:
MalformedURLException
PVL_Exception
IOException

Fill_Fields

public void Fill_Fields(Parameter config)
This uses a Parameter to fill out the fields

This will hunt for fields in the parameter where fields are aggregates will information in them. It then tries to find the name, column number, and a null value for the field. The name is all that is necessary, but if a column number is provided then it will place the field at that index in the list of fields. If a null value is provided then it will insert that into the list of null values at the proper index, otherwise it inserts a null object into that index.

Lastly, this will try to find a Unique key in the parameter. If the unique key is defined as an array in the parameter it will be ignored.

When this method encounters a problem (such as the specified pathname for a field aggregate not containing a name for the field) it skips silently. Use this method cautiously and check its work.

Parameters:
config - The Parameter object

Create_WKT_Centroid_Point

public static String Create_WKT_Centroid_Point(double x,
                                               double y)
This returns a WKT center point based on doubles

Parameters:
x - The x coordinate for the center
y - The y coordinate for the center
Returns:
The WKT Centroid String

Create_WKT_Centroid_Point

public static String Create_WKT_Centroid_Point(String x,
                                               String y)
                                        throws NumberFormatException
This returns a WKT center point based on Strings

The strings are converted to doubles to ensure data validity

Parameters:
x - The x coordinate for the center
y - The y coordinate for the center
Returns:
The WKT Centroid String
Throws:
NumberFormatException - thrown if the given Strings aren't standard floating point numbers

Create_180180_WKT_Centroid_Point

public static String Create_180180_WKT_Centroid_Point(String x,
                                                      String y)
                                               throws NumberFormatException
This returns a WKT center point based on Strings and converts them to the 180,-180 longitude domain.

The strings are converted to doubles to ensure data validity. This will subtract 360 from the longitude if it is above 180 and below or equal to 360.

Parameters:
x - The x coordinate for the center
y - The y coordinate for the center
Returns:
The WKT Centroid String
Throws:
NumberFormatException - thrown if the given Strings aren't standard floating point numbers

Create_WKT_ROI_Polygon_From_Doubles

public static String Create_WKT_ROI_Polygon_From_Doubles(Vector<Vector<Double>> points)
This returns a WKT polygon based on a Vector of Vectors of doubles

This method will make sure that the WKT polygon is wrapped around. Meaning that it puts the first point as both the first point and the last

Parameters:
points - The list of points that make the polygon
Returns:
The WKT polygon String

Create_WKT_ROI_Polygon_From_Strings

public static String Create_WKT_ROI_Polygon_From_Strings(Vector<Vector<String>> points)
                                                  throws NumberFormatException
This returns a WKT polygon based on a Vector of Vectors of Strings

This method will make sure that the WKT polygon is wrapped around. Meaning that it puts the first point as both the first point and the last. This method also ensures data validity by converting the strings to doubles.

Parameters:
points - The list of points that make the polygon
Returns:
The WKT polygon String
Throws:
NumberFormatException - thrown if the given Strings aren't standard floating point numbers

Create_180180_WKT_ROI_Polygon_From_Strings

public static String Create_180180_WKT_ROI_Polygon_From_Strings(Vector<Vector<String>> points)
                                                         throws NumberFormatException
This returns a WKT polygon based on a Vector of Vectors of Strings that is in the 180,-180 longitude format.

This method will make sure that the WKT polygon is wrapped around. Meaning that it puts the first point as both the first point and the last. This method also ensures data validity by converting the strings to doubles. This will subtract 360 from the longitude points if they are above 180 and below or equal to 360.

Parameters:
points - The list of points that make the polygon
Returns:
The WKT polygon String
Throws:
NumberFormatException - thrown if the given Strings aren't standard floating point numbers

HiRISE

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