Package org.opengis.test.dataset
Enum TestData
-
- All Implemented Interfaces:
Serializable,Comparable<TestData>
public enum TestData extends Enum<TestData>
Provides access to small built-in test files. Data can be obtained asURL,File,InputStreamorbyte[]array.- Since:
- 3.1
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NETCDF_2D_GEOGRAPHICA two-dimensional netCDF file using a geographic CRS for global data over the world.NETCDF_4D_PROJECTEDA four-dimensional netCDF file using a projected CRS with elevation and time.
-
Method Summary
Modifier and Type Method Description byte[]content()Returns the full content of the test file as an array of bytes.Filefile()Returns a path on the file system to the test file.URLlocation()Returns a URL to the test file.InputStreamopen()Opens an input stream on the test file.static TestDatavalueOf(String name)Returns the enum constant of this type with the specified name.static TestData[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NETCDF_2D_GEOGRAPHIC
public static final TestData NETCDF_2D_GEOGRAPHIC
A two-dimensional netCDF file using a geographic CRS for global data over the world. The file contains temperature data from model analysis, without missing values.- Data type: 16 bits signed integers (only the positive range is used)
- Coordinate Reference System: two-dimensional geographic
- Geographic area: world, with latitudes ranging from 90°S to 90°N and longitudes from 180°E to 180°W
- Size: 73 × 73 cells in a file of 12.7 kilobytes
In this file, all global attributes are character sequences, including the attributes that should be floating points numbers (Global attributes Name Value ConventionsCF-1.4 Metadata_ConventionsUnidata Dataset Discovery v1.0 titleTest data from Sea Surface Temperature Analysis Model purposeGeoAPI conformance tests summaryGlobal, two-dimensional model data keywordsEARTH SCIENCE > Oceans > Ocean Temperature > Sea Surface Temperature keywords_vocabularyGCMD Science Keywords geospatial_lat_min-90.0 geospatial_lat_max90.0 geospatial_lon_min-180.0 geospatial_lon_max180.0 geospatial_vertical_min0.0 geospatial_vertical_max0.0 time_coverage_start2005-09-22T00:00 time_coverage_duration0.0 cdm_data_typeGrid idNCEP/SST/Global_5x2p5deg/SST_Global_5x2p5deg_20050922_0000.nc naming_authorityedu.ucar.unidata creator_nameNOAA/NWS/NCEP date_created2005-09-22T00:00 date_modified2018-05-15T13:00 date_metadata_modified2018-05-15T13:01 historyDecimated and modified by GeoAPI for inclusion in conformance test suite. commentFor testing purpose only. licenseFreely available geospatial_lat_min,geospatial_lat_max, etc.). Implementations are encouraged to be tolerant.
-
NETCDF_4D_PROJECTED
public static final TestData NETCDF_4D_PROJECTED
A four-dimensional netCDF file using a projected CRS with elevation and time. The file contains Current Icing Product data without missing values. The coordinate reference system contains also an height axis and a time axis.- Data type: 32 bits floating point numbers
- Coordinate Reference System: four-dimensional projected + elevation + temporal
- Geographic area: East part of North America
- Size: 38 × 19 × 4 × 1 cells in a file of 14.2 kilobytes
If this file, all global attribute for numeric values use theGlobal attributes Name Value ConventionsCF-1.4 titleTest data from Current Icing Product (CIP) purposeGeoAPI conformance tests summaryHourly, three-dimensional diagnosis of the icing environment. sourceU.S. National Weather Service - NCEP (WMC) institutionUCAR topic_categoryclimatology meteorology atmosphere geospatial_lat_min15.94 geospatial_lat_max58.37 geospatial_lon_min-107.75 geospatial_lon_max-56.66 geospatial_vertical_min300.0 geospatial_vertical_max4875.0 geospatial_vertical_positiveup geospatial_lat_resolution0.93 geospatial_lon_resolution1.34 creator_nameJohn Doe creator_emailjohn.doe@example.org date_modified2012-02-21T21:14Z date_metadata_modified2018-05-14T14:45Z historyDecimated and modified by GeoAPI for inclusion in conformance test suite. commentFor testing purpose only. floattype.
-
-
Method Detail
-
values
public static TestData[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TestData valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
location
public URL location()
Returns a URL to the test file. The URL is not necessary a file on the default file system; it may be an entry inside a JAR file. If a path on the file system is desired, usefile()instead.- Returns:
- a URL to the test file, possibly as an entry inside a JAR file.
-
file
public File file() throws IOException
Returns a path on the file system to the test file. If the test file is inside a JAR file, then it will be copied in a temporary directory and the path to the temporary file will be returned.- Returns:
- a path on the default file system, possible as a temporary file.
- Throws:
IOException- if a copy operation was necessary but failed.
-
open
public InputStream open()
Opens an input stream on the test file. It is caller responsibility to close the stream after usage.- Returns:
- an input stream on the test file.
-
content
public byte[] content() throws IOException
Returns the full content of the test file as an array of bytes.- Returns:
- the test file content.
- Throws:
IOException- if an error occurred while reading the test file.
-
-