Skip to content
Snippets Groups Projects
Commit b7d1dc20 authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Fixed checkstyle errors.

parent d4926652
No related branches found
No related tags found
No related merge requests found
...@@ -16,9 +16,13 @@ ...@@ -16,9 +16,13 @@
*/ */
package org.orekit.rugged.geotiff; package org.orekit.rugged.geotiff;
/** Enumerate for angular units.
* @see <a href="http://www.remotesensing.org/geotiff/spec/geotiff6.html#6.3.1.4">GeoTIFF specification, section 6.3.1.4</a>
* @author Luc Maisonobe
*/
enum AngulerUnits { enum AngulerUnits {
// CHECKSTYLE: stop JavadocVariable check
RADIAN(9101), RADIAN(9101),
DEGREE(9102), DEGREE(9102),
ARC_MINUTE(9103), ARC_MINUTE(9103),
...@@ -27,6 +31,7 @@ enum AngulerUnits { ...@@ -27,6 +31,7 @@ enum AngulerUnits {
GON(9106), GON(9106),
DMS(9107), DMS(9107),
DMS_HEMISPHERE(9108); DMS_HEMISPHERE(9108);
// CHECKSTYLE: resume JavadocVariable check
/** Units ID. */ /** Units ID. */
private final int id; private final int id;
......
...@@ -17,9 +17,13 @@ ...@@ -17,9 +17,13 @@
package org.orekit.rugged.geotiff; package org.orekit.rugged.geotiff;
/** Enumerate for GeoTIFF keys.
* @see <a href="http://www.remotesensing.org/geotiff/spec/geotiff6.html#6.2">GeoTIFF specification, section 6.2</a>
* @author Luc Maisonobe
*/
enum GeoKey { enum GeoKey {
// CHECKSTYLE: stop JavadocVariable check
GT_MODEL_TYPE(1024), GT_MODEL_TYPE(1024),
GT_RASTER_TYPE(1025), GT_RASTER_TYPE(1025),
GT_CITATION(1026), GT_CITATION(1026),
...@@ -68,6 +72,7 @@ enum GeoKey { ...@@ -68,6 +72,7 @@ enum GeoKey {
VERTICAL_CITATION(4097), VERTICAL_CITATION(4097),
VERTICAL_DATUM(4098), VERTICAL_DATUM(4098),
VERTICAL_UNITS(4099); VERTICAL_UNITS(4099);
// CHECKSTYLE: resume JavadocVariable check
/** Key ID. */ /** Key ID. */
private final int id; private final int id;
......
...@@ -102,37 +102,37 @@ public class GeoTiffDEM { ...@@ -102,37 +102,37 @@ public class GeoTiffDEM {
pixelsScales = content.findField(GeoTiffTagConstants.EXIF_TAG_MODEL_PIXEL_SCALE_TAG).getDoubleArrayValue(); pixelsScales = content.findField(GeoTiffTagConstants.EXIF_TAG_MODEL_PIXEL_SCALE_TAG).getDoubleArrayValue();
tiePoint = content.findField(GeoTiffTagConstants.EXIF_TAG_MODEL_TIEPOINT_TAG).getDoubleArrayValue(); tiePoint = content.findField(GeoTiffTagConstants.EXIF_TAG_MODEL_TIEPOINT_TAG).getDoubleArrayValue();
TiffField geoAsciiParams = content.findField(GeoTiffTagConstants.EXIF_TAG_GEO_ASCII_PARAMS_TAG); final TiffField geoAsciiParams = content.findField(GeoTiffTagConstants.EXIF_TAG_GEO_ASCII_PARAMS_TAG);
TiffField geoDoubleParams = content.findField(GeoTiffTagConstants.EXIF_TAG_GEO_DOUBLE_PARAMS_TAG); final TiffField geoDoubleParams = content.findField(GeoTiffTagConstants.EXIF_TAG_GEO_DOUBLE_PARAMS_TAG);
int[] geoKeyDirectory = content.findField(GeoTiffTagConstants.EXIF_TAG_GEO_KEY_DIRECTORY_TAG).getIntArrayValue(); final int[] geoKeyDirectory = content.findField(GeoTiffTagConstants.EXIF_TAG_GEO_KEY_DIRECTORY_TAG).getIntArrayValue();
int keyDirectoryVersion = geoKeyDirectory[0]; final int keyDirectoryVersion = geoKeyDirectory[0];
int keyRevision = geoKeyDirectory[1]; final int keyRevision = geoKeyDirectory[1];
int minorRevision = geoKeyDirectory[2]; final int minorRevision = geoKeyDirectory[2];
int numberOfKeys = geoKeyDirectory[3]; final int numberOfKeys = geoKeyDirectory[3];
for (int i = 0; i < numberOfKeys; ++i) { for (int i = 0; i < numberOfKeys; ++i) {
GeoKey geoKey = GeoKey.getKey(geoKeyDirectory[4 * i + 4]); final GeoKey geoKey = GeoKey.getKey(geoKeyDirectory[4 * i + 4]);
int location = geoKeyDirectory[4 * i + 5]; final int location = geoKeyDirectory[4 * i + 5];
int count = geoKeyDirectory[4 * i + 6]; final int count = geoKeyDirectory[4 * i + 6];
int valueOffset = geoKeyDirectory[4 * i + 7]; final int valueOffset = geoKeyDirectory[4 * i + 7];
switch(geoKey) { switch(geoKey) {
case GT_MODEL_TYPE: case GT_MODEL_TYPE:
modelType = ModelType.getType(getShort(geoKey, location, count, valueOffset)); modelType = ModelType.getType(getShort(geoKey, location, count, valueOffset));
break; break;
case GT_RASTER_TYPE: case GT_RASTER_TYPE:
rasterType = RasterType.getType(getShort(geoKey, location, count, valueOffset)); rasterType = RasterType.getType(getShort(geoKey, location, count, valueOffset));
break; break;
case GEOGRAPHIC_TYPE: case GEOGRAPHIC_TYPE:
csType = GeographicCoordinateSystemType.getType(getShort(geoKey, location, count, valueOffset)); csType = GeographicCoordinateSystemType.getType(getShort(geoKey, location, count, valueOffset));
break; break;
case GEOG_LINEAR_UNITS: case GEOG_LINEAR_UNITS:
linearUnits = LinearUnits.getUnits(getShort(geoKey, location, count, valueOffset)); linearUnits = LinearUnits.getUnits(getShort(geoKey, location, count, valueOffset));
break; break;
case GEOG_ANGULAR_UNITS: case GEOG_ANGULAR_UNITS:
angulerUnits = AngulerUnits.getUnits(getShort(geoKey, location, count, valueOffset)); angulerUnits = AngulerUnits.getUnits(getShort(geoKey, location, count, valueOffset));
break; break;
default: default:
// TODO: support the other geo keys // TODO: support the other geo keys
throw new ImageReadException(geoKey + " unsupported for now"); throw new ImageReadException(geoKey + " unsupported for now");
} }
} }
...@@ -143,6 +143,7 @@ public class GeoTiffDEM { ...@@ -143,6 +143,7 @@ public class GeoTiffDEM {
* @param location location of the short * @param location location of the short
* @param count number of elements * @param count number of elements
* @param valueOffset offset of the value * @param valueOffset offset of the value
* @return short value
* @exception ImageReadException if value cannot be retrieved * @exception ImageReadException if value cannot be retrieved
*/ */
private int getShort(final GeoKey key, final int location, final int count, final int valueOffset) private int getShort(final GeoKey key, final int location, final int count, final int valueOffset)
......
...@@ -17,8 +17,13 @@ ...@@ -17,8 +17,13 @@
package org.orekit.rugged.geotiff; package org.orekit.rugged.geotiff;
/** Enumerate for geographic coordinate system type.
* @see <a href="http://www.remotesensing.org/geotiff/spec/geotiff6.html#6.3.2.1">GeoTIFF specification, section 6.3.2.1</a>
* @author Luc Maisonobe
*/
enum GeographicCoordinateSystemType { enum GeographicCoordinateSystemType {
// CHECKSTYLE: stop JavadocVariable check
GCS_UNDEFINED(0), GCS_UNDEFINED(0),
GCS_ADINDAN(4201), GCS_ADINDAN(4201),
GCS_AGD66(4202), GCS_AGD66(4202),
...@@ -188,6 +193,7 @@ enum GeographicCoordinateSystemType { ...@@ -188,6 +193,7 @@ enum GeographicCoordinateSystemType {
GCSE_OSU91A(4033), GCSE_OSU91A(4033),
GCSE_CLARKE1880(4034), GCSE_CLARKE1880(4034),
GCSE_SPHERE(4035); GCSE_SPHERE(4035);
// CHECKSTYLE: resume JavadocVariable check
/** Type ID. */ /** Type ID. */
private final int id; private final int id;
......
...@@ -17,8 +17,13 @@ ...@@ -17,8 +17,13 @@
package org.orekit.rugged.geotiff; package org.orekit.rugged.geotiff;
/** Enumerate for linear units.
* @see <a href="http://www.remotesensing.org/geotiff/spec/geotiff6.html#6.3.1.3">GeoTIFF specification, section 6.3.1.3</a>
* @author Luc Maisonobe
*/
enum LinearUnits { enum LinearUnits {
// CHECKSTYLE: stop JavadocVariable check
METER(9001), METER(9001),
FOOT(9002), FOOT(9002),
FOOT_US_SURVEY(9003), FOOT_US_SURVEY(9003),
...@@ -34,6 +39,7 @@ enum LinearUnits { ...@@ -34,6 +39,7 @@ enum LinearUnits {
YARD_INDIAN(9013), YARD_INDIAN(9013),
FATHOM(9014), FATHOM(9014),
MILE_INTERNATIONAL_NAUTICAL(9015); MILE_INTERNATIONAL_NAUTICAL(9015);
// CHECKSTYLE: resume JavadocVariable check
/** Units ID. */ /** Units ID. */
private final int id; private final int id;
......
...@@ -17,12 +17,18 @@ ...@@ -17,12 +17,18 @@
package org.orekit.rugged.geotiff; package org.orekit.rugged.geotiff;
/** Enumerate for model type.
* @see <a href="http://www.remotesensing.org/geotiff/spec/geotiff6.html#6.3.1.1">GeoTIFF specification, section 6.3.1.1</a>
* @author Luc Maisonobe
*/
enum ModelType { enum ModelType {
// CHECKSTYLE: stop JavadocVariable check
UNDEFINED(0), UNDEFINED(0),
PROJECTED(1), PROJECTED(1),
GEOGRAPHIC(2), GEOGRAPHIC(2),
GEOCENTRIC(3); GEOCENTRIC(3);
// CHECKSTYLE: resume JavadocVariable check
/** Type ID. */ /** Type ID. */
private final int id; private final int id;
......
...@@ -17,11 +17,17 @@ ...@@ -17,11 +17,17 @@
package org.orekit.rugged.geotiff; package org.orekit.rugged.geotiff;
/** Enumerate for raster types.
* @see <a href="http://www.remotesensing.org/geotiff/spec/geotiff6.html#6.3.1.2">GeoTIFF specification, section 6.3.1.2</a>
* @author Luc Maisonobe
*/
enum RasterType { enum RasterType {
// CHECKSTYLE: stop JavadocVariable check
UNDEFINED(0), UNDEFINED(0),
RASTER_PIXEL_IS_AREA(1), RASTER_PIXEL_IS_AREA(1),
RASTER_PIXEL_IS_POINT(2); RASTER_PIXEL_IS_POINT(2);
// CHECKSTYLE: resume JavadocVariable check
/** Type ID. */ /** Type ID. */
private final int id; private final int id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment