- All Implemented Interfaces:
Serializable
,Comparable<TestData>
,Constable
Provides access to small built-in test files.
Data can be obtained as
URL
, File
, InputStream
or byte[]
array.- Since:
- 3.1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTrajectory of 3 features with 6, 4 and 3 points respectively, followed by two intentionally empty features.A two-dimensional netCDF file using a geographic CRS for global data over the world.A four-dimensional netCDF file using a projected CRS with elevation and time. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
content()
Returns the full content of the test file as an array of bytes.file()
Returns a path on the file system to the test file.location()
Returns a URL to the test file.open()
Opens an input stream on the test file.static TestData
Returns the enum constant of this class with the specified name.static TestData[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
Global attributes Name Value Conventions
CF-1.4 Metadata_Conventions
Unidata Dataset Discovery v1.0 title
Test data from Sea Surface Temperature Analysis Model purpose
GeoAPI conformance tests summary
Global, two-dimensional model data keywords
EARTH SCIENCE > Oceans > Ocean Temperature > Sea Surface Temperature keywords_vocabulary
GCMD Science Keywords geospatial_lat_min
-90.0 geospatial_lat_max
90.0 geospatial_lon_min
-180.0 geospatial_lon_max
180.0 geospatial_vertical_min
0.0 geospatial_vertical_max
0.0 time_coverage_start
2005-09-22T00:00 time_coverage_duration
0.0 cdm_data_type
Grid id
NCEP/SST/Global_5x2p5deg/SST_Global_5x2p5deg_20050922_0000.nc naming_authority
edu.ucar.unidata creator_name
NOAA/NWS/NCEP date_created
2005-09-22T00:00 date_modified
2018-05-15T13:00 date_metadata_modified
2018-05-15T13:01 history
Decimated and modified by GeoAPI for inclusion in conformance test suite. comment
For testing purpose only. license
Freely available geospatial_lat_min
,geospatial_lat_max
, etc.). Implementations are encouraged to be tolerant. -
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 also contains 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
Global attributes Name Value Conventions
CF-1.4 title
Test data from Current Icing Product (CIP) purpose
GeoAPI conformance tests summary
Hourly, three-dimensional diagnosis of the icing environment. source
U.S. National Weather Service - NCEP (WMC) institution
UCAR topic_category
climatology meteorology atmosphere geospatial_lat_min
15.94 geospatial_lat_max
58.37 geospatial_lon_min
-107.75 geospatial_lon_max
-56.66 geospatial_vertical_min
300.0 geospatial_vertical_max
4875.0 geospatial_vertical_positive
up geospatial_lat_resolution
0.93 geospatial_lon_resolution
1.34 creator_name
John Doe creator_email
john.doe@example.org date_modified
2012-02-21T21:14Z date_metadata_modified
2018-05-14T14:45Z history
Decimated and modified by GeoAPI for inclusion in conformance test suite. comment
For testing purpose only. float
type. -
MOVING_FEATURES
Trajectory of 3 features with 6, 4 and 3 points respectively, followed by two intentionally empty features. This is a small extract of"JaPOPPO.csv"
file encoded as specified in OGC 16-114 best practice paper. The two trailing empty features are for testing implementation capability to ignore them. Coordinates are latitude, longitude and time as minutes elapsed since 2014-11-29 midnight UTC. Features contain one property named "stations" defined as an enumeration:short stations(points): stations:flag_values = 11s, 12s, 13s, 14s, 15s, 16s, 21s, 22s, 23s, 24s, 31s, 32s stations:flag_meanings = "Yokohama Kawasaki Shinagawa Shinbashi Yurakucho Tokyo " "Shinjuku Yotsuya Ochanomizu Akihabara Koenji Nakano"
Global attributes Name Value Conventions
CF-1.6 featureType
trajectory title
Small moving features file purpose
GeoAPI conformance tests source
Extracts from JaPOPPO.csv geospatial_lat_min
30 geospatial_lat_max
40 geospatial_lon_min
130 geospatial_lon_max
150 time_coverage_start
2014-11-29T00:00:00Z time_coverage_end
2014-12-05T23:59:59Z comment
Intentionally contains two empty features for testing robustness.
-
-
Method Details
-
values
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
location
-
file
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
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
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.
-