Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • orekit/rugged
  • sdinot/rugged
  • yzokras/rugged
  • youngcle/rugged-mod
4 results
Show changes
Commits on Source (968)
Showing
with 279 additions and 1271 deletions
A directory for Continuous Integration tooling.
\ No newline at end of file
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xsi:schemalocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<!-- mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
<mirror>
<id>Nexus-Rugged</id>
<name>Maven Repository Manager</name>
<!-- Share the same Nexus repository as Orekit -->
<url>https://packages.orekit.org/repository/maven-public/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
<servers>
<server>
<id>ci-releases</id>
<username>${env.NEXUS_USERNAME}</username>
<password>${env.NEXUS_PASSWORD}</password>
</server>
<server>
<id>ci-snapshots</id>
<username>${env.NEXUS_USERNAME}</username>
<password>${env.NEXUS_PASSWORD}</password>
</server>
<server>
<id>website</id>
<privateKey>${user.home}/.ssh/id_website</privateKey>
</server>
</servers>
<profiles>
<profile>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>Nexus-Rugged</id>
<name>Nexus Public Repository</name>
<!-- Share the same Nexus repository as Orekit -->
<url>https://packages.orekit.org/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</settings>
......@@ -3,6 +3,4 @@ bin
.project
.settings
target
geotiff/target
geotiff/src/test/resources/org/orekit/rugged/geotiff/ASTGTM2_*.zip
stages:
- verify
- deploy
default:
# Default image
image: registry.orekit.org/orekit/ci-utils/maven:3.3.9-jdk-8
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_REF_NAME"'
cache:
paths:
- .m2/repository
variables:
# This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
# As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
# when running from the command line.
# `installAtEnd` and `deployAtEnd` are only effective with recent version of the corresponding plugins.
MAVEN_CLI_OPTS: "-s .CI/maven-settings.xml --batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
verify:
stage: verify
script:
- mvn $MAVEN_CLI_OPTS verify site
- mvn $MAVEN_CLI_OPTS sonar:sonar -Dsonar.login=${SONAR_TOKEN} -Dsonar.branch.name=${CI_COMMIT_REF_NAME}
artifacts:
paths:
- target/*.jar
- target/site
reports:
junit:
- target/surefire-reports/*.xml
# On main branches (develop, release-*, master)
# the produced artifacts are deployed on the Nexus of the project
# (https://packages.orekit.org/)
deploy:artifacts:
stage: deploy
script:
- mvn $MAVEN_CLI_OPTS javadoc:jar source:jar deploy -DskipTests=true -Pci-deploy
artifacts:
paths:
- target/*.jar
only:
- develop@orekit/rugged
- /^release-[.0-9]+$/@orekit/rugged
- master@orekit/rugged
deploy:site:
stage: deploy
before_script:
##
## Create the SSH directory and give it the right permissions
##
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
##
## We're using tr to fix line endings which makes ed25519 keys work
## without extra base64 encoding.
## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
##
- echo "$SSH_SECRET_KEY" > ~/.ssh/id_website
- chmod 700 ~/.ssh/id_website
##
## Add known hosts
##
- cp $SSH_KNOWN_HOSTS ~/.ssh/known_hosts
script:
- mvn $MAVEN_CLI_OPTS site:deploy
only:
- master@orekit/rugged
- /^release-[.0-9]+$/@orekit/rugged
- develop@orekit/rugged
RUGGED
Copyright 2014 CS Systèmes d'Information
Copyright 2013-2022 CS GROUP
This product includes software developed by
CS Systèmes d'Information (http://www.c-s.fr/)
CS GROUP (https://www.csgroup.eu/)
This product depends on software developed by
The Apache Software Foundation (http://www.apache.org/)
This product depends on software developed by
The Hipparchus project (https://hipparchus.org/)
![Rugged logo](https://www.orekit.org/rugged/img/rugged-logo-small.jpg)
# Rugged
> A sensor-to-terrain mapping tool
[Rugged](https://www.orekit.org/rugged/ "Rugged homepage") is a free java library for geolocation and used for satellite imagery.
Rugged is an add-on for [Orekit](https://www.orekit.org/ "Orekit homepage") handling Digital Elevation Models contribution to line of sight computation. It is a free software intermediate-level library written in Java.
It mainly provides direct and inverse location, i.e. it allows to compute accurately
which ground point is looked at from a specific pixel in a spacecraft instrument,
and conversely which pixel will see a specified ground point. This mapping between
ground and sensor is computed with a viewing model taking into account:
* ground Digital Elevation Model (DEM),
* Earth rotation will all its tiny irregularities,
* on-board sensor pixels individual line-of-sights,
* spacecraft motion and attitude,
* several physical effects.
Direct and inverse location can be used to perform full ortho-rectification of
images and correlation between sensors observing the same area.
[![](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
[![](https://sonar.orekit.org/api/project_badges/measure?project=org.orekit%3Arugged&metric=alert_status)](https://sonar.orekit.org/dashboard?id=org.orekit%3Arugged)
[![](https://sonar.orekit.org/api/project_badges/measure?project=org.orekit%3Arugged&metric=coverage)](https://sonar.orekit.org/component_measures?id=org.orekit%3Arugged&metric=coverage&view=treemap)
## Download
### Official releases
[Official Rugged releases](https://gitlab.orekit.org/orekit/rugged/-/releases)
are available on our [Gitlab instance](https://gitlab.orekit.org/orekit/rugged). They are
also available in the
[Maven repository](https://mvnrepository.com/artifact/org.orekit/rugged).
### Development version
To get the latest development version, please clone our official repository
and checkout the `develop` branch:
```bash
git clone -b develop https://gitlab.orekit.org/orekit/rugged.git
```
__Note:__ Our official repository is
[mirrored on Github](https://github.com/CS-SI/Rugged).
## Documentation
Project overview, architecture and development, detailed features list,
Javadoc and a lot of other information is available on the
[Maven site](https://www.orekit.org/site-rugged-development/).
## Getting help
The main communication channel is our [forum](https://forum.orekit.org/). You
can report bugs and suggest new features in our
[issues tracking system](https://gitlab.orekit.org/orekit/rugged/-/issues). When
reporting security issues check the "This issue is confidential" box.
## Contributing
Please take a look at our
[contributing guidelines](https://www.orekit.org/site-rugged-latest/contributing.html) if you're
interested in helping!
## Building
Detailed information on how to build Rugged from source either using Maven or
Eclipse is provided in [building](https://www.orekit.org/site-rugged-latest/building.html) explanations.
## Dependencies
Rugged relies on the following
[FOSS](https://en.wikipedia.org/wiki/Free_and_open-source_software) libraries,
all released under business friendly FOSS licenses.
### Compile-time/run-time dependencies
* [Orekit](https://www.orekit.org/), a low level space dynamics library released under
the Apache License, version 2.0.
* [Hipparchus](https://hipparchus.org/), a mathematics library released under
the Apache License, version 2.0.
### Test-time dependencies
* [JUnit 4](http://www.junit.org/), a widely used unit test framework released
under the Eclipse Public License, version 1.0.
More detailed information is available in the
[Maven site](https://www.orekit.org/site-rugged-development/dependencies.html).
## License
Rugged is licensed by [CS GROUP](https://www.csgroup.eu/) under
the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
A copy of this license is provided in the [LICENSE.txt](LICENSE.txt) file.
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="TreeWalker">
......@@ -31,11 +32,10 @@
<module name="IllegalImport"/>
<module name="Indentation">
<property name="basicOffset" value="4"/>
<property name="caseIndent" value="0"/>
<property name="caseIndent" value="4"/>
</module>
<module name="JavadocMethod">
<property name="allowUndeclaredRTE" value="true"/>
<property name="allowMissingPropertyJavadoc" value="true"/>
<property name="validateThrows" value="false"/>
</module>
<module name="JavadocStyle"/>
<module name="JavadocVariable"/>
......@@ -70,31 +70,37 @@
PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR,
SR_ASSIGN, STAR, STAR_ASSIGN"/>
</module>
<module name="FileContentsHolder"/>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop JavadocVariable check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume JavadocVariable check"/>
<property name="checkFormat" value="JavadocVariable"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop VisibilityModifier check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume VisibilityModifier check"/>
<property name="checkFormat" value="VisibilityModifierCheck"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop NoWhitespaceAfter check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume NoWhitespaceAfter check"/>
<property name="checkFormat" value="NoWhitespaceAfter"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop Indentation check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume Indentation check"/>
<property name="checkFormat" value="IndentationCheck"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop MultipleStringLiterals check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume MultipleStringLiterals check"/>
<property name="checkFormat" value="MultipleStringLiteralsCheck"/>
</module>
</module>
<module name="RegexpHeader">
<property name="headerFile" value="${checkstyle.header.file}" />
</module>
<module name="FileTabCharacter"/>
<module name="NewlineAtEndOfFile"/>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop JavadocVariable check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume JavadocVariable check"/>
<property name="checkFormat" value="JavadocVariable"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop VisibilityModifierCheck"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume VisibilityModifierCheck"/>
<property name="checkFormat" value="VisibilityModifierCheck"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop NoWhitespaceAfter"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume NoWhitespaceAfter"/>
<property name="checkFormat" value="NoWhitespaceAfter"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop FallThrough check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume FallThrough check"/>
<property name="checkFormat" value="FallThrough"/>
</module>
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="LF_CR_CRLF"/>
</module>
</module>
File deleted
<?xml version="1.0"?>
<!--
This file contains some false positive bugs detected by findbugs. Their
false positive nature has been analyzed individually and they have been
put here to instruct findbugs it must ignore them.
-->
<FindBugsFilter>
</FindBugsFilter>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.orekit</groupId>
<artifactId>rugged-geotiff</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Rugged GeoTIFF</name>
<inceptionYear>2014</inceptionYear>
<description>
Rugged is an Orekit add-on handling Digital Elevation Models
contribution to line of sight computation
</description>
<developers>
<developer>
<name>Luc Maisonobe</name>
<id>luc</id>
<roles>
<role>architect</role>
<role>developer</role>
</roles>
</developer>
</developers>
<contributors>
<contributor>
<name>Aude Espesset</name>
</contributor>
</contributors>
<organization>
<name>CS Syst&#232;mes d&#039;Information</name>
<url>http://www.c-s.fr/</url>
</organization>
<dependencies>
<dependency>
<groupId>org.orekit</groupId>
<artifactId>rugged</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-imaging</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<type>jar</type>
<scope>test</scope>
<optional>false</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/source-assembly.xml</descriptor>
<descriptor>src/main/assembly/binary-assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.6.3.201306030806</version>
<executions>
<execution>
<id>prepare-agent</id>
<phase>process-test-classes</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>site</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>CLASS</counter>
<value>COVEREDRATIO</value>
<minimum>1.00</minimum>
</limit>
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.90</minimum>
</limit>
<limit>
<counter>METHOD</counter>
<value>COVEREDRATIO</value>
<minimum>0.95</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>0.85</minimum>
</limit>
<limit>
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>0.85</minimum>
</limit>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.90</minimum>
</limit>
</limits>
</rule>
</rules>
<haltOnFailure>false</haltOnFailure>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.jeluard</groupId>
<artifactId>maven-plantuml-plugin</artifactId>
<version>7940</version>
<configuration>
<sourceFiles>
<directory>${basedir}</directory>
<includes>
<include>
design/**/*.puml
</include>
</includes>
</sourceFiles>
<outputDirectory>
${basedir}/target/site/images/design
</outputDirectory>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId>
<version>7986</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<configuration>
<inputEncoding>UTF-8</inputEncoding>
<outputEncoding>UTF-8</outputEncoding>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.6.3.201306030806</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<threshold>Normal</threshold>
<effort>Default</effort>
<excludeFilterFile>${basedir}/findbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.11</version>
<configuration>
<encoding>UTF-8</encoding>
<configLocation>${basedir}/checkstyle.xml</configLocation>
<enableRulesSummary>false</enableRulesSummary>
<headerLocation>${basedir}/license-header.txt</headerLocation>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<version>2.9</version>
<configuration>
<xmlPath>${basedir}/src/site/xdoc/changes.xml</xmlPath>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>changes-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
<configuration>
<outputEncoding>UTF-8</outputEncoding>
<linkJavadoc>false</linkJavadoc>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<overview>${basedir}/src/main/java/org/orekit/rugged/overview.html</overview>
<links>
<link>http://download.oracle.com/javase/1.6.0/docs/api/</link>
<link>http://commons.apache.org/math/apidocs/</link>
<link>https://www.orekit.org/static/apidocs/index.html</link>
</links>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
<encoding>UTF-8</encoding>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</project>
<assembly>
<id>bin</id>
<formats>
<format>zip</format>
</formats>
<dependencySets>
<dependencySet>
<outputDirectory>/lib</outputDirectory>
<excludes>
<exclude>org.orekit:rugged</exclude>
</excludes>
<unpack>false</unpack>
</dependencySet>
</dependencySets>
<componentDescriptors>
<componentDescriptor>src/main/assembly/misc-files.xml</componentDescriptor>
<componentDescriptor>src/main/assembly/jar-files.xml</componentDescriptor>
</componentDescriptors>
</assembly>
<component>
<fileSets>
<fileSet>
<includes>
<include>pom.xml</include>
</includes>
<useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
<fileSet>
<directory>src</directory>
<useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
</fileSets>
</component>
\ No newline at end of file
<component>
<fileSets>
<fileSet>
<directory>target</directory>
<outputDirectory></outputDirectory>
<includes>
<include>*.jar</include>
</includes>
</fileSet>
</fileSets>
</component>
\ No newline at end of file
<component>
<fileSets>
<fileSet>
<outputDirectory>/licenses</outputDirectory>
<includes>
<include>LICENSE.txt</include>
<include>NOTICE.txt</include>
<include>Apache-Commons-Math-LICENSE.txt</include>
<include>Orekit-LICENSE.txt</include>
</includes>
</fileSet>
</fileSets>
</component>
<assembly>
<id>sources</id>
<formats>
<format>zip</format>
</formats>
<componentDescriptors>
<componentDescriptor>src/main/assembly/misc-files.xml</componentDescriptor>
<componentDescriptor>src/main/assembly/building-files.xml</componentDescriptor>
</componentDescriptors>
</assembly>
\ No newline at end of file
/* Copyright 2013-2014 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.rugged.geotiff;
import org.apache.commons.math3.util.FastMath;
/** 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 {
// CHECKSTYLE: stop JavadocVariable check
RADIAN(9101) {
/** {@inheritDoc} */
@Override
public double toRadians(final double raw) {
return raw;
}
},
DEGREE(9102) {
/** {@inheritDoc} */
@Override
public double toRadians(final double raw) {
return FastMath.toRadians(raw);
}
},
ARC_MINUTE(9103) {
/** {@inheritDoc} */
@Override
public double toRadians(final double raw) {
return FastMath.toRadians(raw / 60.0);
}
},
ARC_SECOND(9104) {
/** {@inheritDoc} */
@Override
public double toRadians(final double raw) {
return FastMath.toRadians(raw / 3600.0);
}
},
GRAD(9105) {
/** {@inheritDoc} */
@Override
public double toRadians(final double raw) {
return FastMath.PI * raw / 200.0;
}
},
GON(9106) {
/** {@inheritDoc} */
@Override
public double toRadians(final double raw) {
return GRAD.toRadians(raw);
}
},
DMS(9107) {
/** {@inheritDoc} */
@Override
public double toRadians(final double raw) {
throw new UnsupportedOperationException();
}
},
DMS_HEMISPHERE(9108) {
/** {@inheritDoc} */
@Override
public double toRadians(final double raw) {
throw new UnsupportedOperationException();
}
};
// CHECKSTYLE: resume JavadocVariable check
/** Units ID. */
private final int id;
/** Simple constructor.
* @param id key id
*/
private AngulerUnits(final int id) {
this.id = id;
}
/** Convert an angle to radians.
* @param raw angle, in instance units
* @return angle in radians
*/
public abstract double toRadians(final double raw);
/** Get the units corresponding to an id.
* @param id type id
* @return the units corresponding to the id
* @exception IllegalArgumentException if the id does not correspond to known units
*/
public static AngulerUnits getUnits(final int id) {
for (AngulerUnits units : values()) {
if (units.id == id) {
return units;
}
}
throw new IllegalArgumentException();
}
}
/* Copyright 2002-2014 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.rugged.geotiff;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
import org.apache.commons.math3.exception.util.Localizable;
/**
* Enumeration for localized messages formats.
* <p>
* The constants in this enumeration represent the available
* formats as localized strings. These formats are intended to be
* localized using simple properties files, using the constant
* name as the key and the property value as the message format.
* The source English format is provided in the constants themselves
* to serve both as a reminder for developers to understand the parameters
* needed by each format, as a basis for translators to create
* localized properties files, and as a default format if some
* translation is missing.
* </p>
* <p>
* This class is heavily based on Orekit {@link org.orekit.errors.OrekitMessages},
* which is distributed under the terms of the Apache License V2.
* </p>
*/
public enum AsterMessages implements Localizable {
// CHECKSTYLE: stop JavadocVariable check
NO_DEM_DATA_FOR_POINT("no Digital Elevation Model data for point {0}, {1}"),
ERROR_PARSING_FILE("error parsing file {0}: {1}"),
MISSING_PIXEL_SCALE("missing pixel scale GeoTIFF tag in file {0}"),
MISSING_TIE_POINT("missing tie point GeoTIFF tag in file {0}"),
UNSUPPORTED_GEOTIFF_VERSION("unsupported GeoTIFF version {0}/{1}.{2} in file {3} (expected {4}/{5}.{6})"),
UNABLE_TO_RETRIEVE_VALUE_FOR_KEY("unable to retrieve value for key {0} in file {1}"),
UNEXPECTED_GEOKEY("unexpected GeoTIFF key {0} in file {1}"),
UNEXPECTED_GEOKEY_VALUE("GeoTIFF key {0} in file {1} has unexpected value {2} (expected {3})");
// CHECKSTYLE: resume JavadocVariable check
/** Base name of the resource bundle in classpath. */
private static final String RESOURCE_BASE_NAME = "assets/org/orekit/rugged/AsterMessages";
/** Source English format. */
private final String sourceFormat;
/** Simple constructor.
* @param sourceFormat source English format to use when no
* localized version is available
*/
private AsterMessages(final String sourceFormat) {
this.sourceFormat = sourceFormat;
}
/** {@inheritDoc} */
public String getSourceString() {
return sourceFormat;
}
/** {@inheritDoc} */
public String getLocalizedString(final Locale locale) {
try {
final ResourceBundle bundle =
ResourceBundle.getBundle(RESOURCE_BASE_NAME, locale, new UTF8Control());
if (bundle.getLocale().getLanguage().equals(locale.getLanguage())) {
final String translated = bundle.getString(name());
if ((translated != null) &&
(translated.length() > 0) &&
(!translated.toLowerCase().contains("missing translation"))) {
// the value of the resource is the translated format
return translated;
}
}
} catch (MissingResourceException mre) {
// do nothing here
}
// either the locale is not supported or the resource is not translated or
// it is unknown: don't translate and fall back to using the source format
return sourceFormat;
}
/** Control class loading properties in UTF-8 encoding.
* <p>
* This class has been very slightly adapted from BalusC answer to question: <a
* href="http://stackoverflow.com/questions/4659929/how-to-use-utf-8-in-resource-properties-with-resourcebundle">
* How to use UTF-8 in resource properties with ResourceBundle</a>.
* </p>
*/
public static class UTF8Control extends ResourceBundle.Control {
/** {@inheritDoc} */
@Override
public ResourceBundle newBundle(final String baseName, final Locale locale, final String format,
final ClassLoader loader, final boolean reload)
throws IllegalAccessException, InstantiationException, IOException {
// The below is a copy of the default implementation.
final String bundleName = toBundleName(baseName, locale);
final String resourceName = toResourceName(bundleName, "utf8");
ResourceBundle bundle = null;
InputStream stream = null;
if (reload) {
final URL url = loader.getResource(resourceName);
if (url != null) {
final URLConnection connection = url.openConnection();
if (connection != null) {
connection.setUseCaches(false);
stream = connection.getInputStream();
}
}
} else {
stream = loader.getResourceAsStream(resourceName);
}
if (stream != null) {
try {
// Only this line is changed to make it to read properties files as UTF-8.
bundle = new PropertyResourceBundle(new InputStreamReader(stream, "UTF-8"));
} finally {
stream.close();
}
}
return bundle;
}
}
}
/* Copyright 2013-2014 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.rugged.geotiff;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteOrder;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.apache.commons.imaging.FormatCompliance;
import org.apache.commons.imaging.ImageReadException;
import org.apache.commons.imaging.common.bytesource.ByteSource;
import org.apache.commons.imaging.common.bytesource.ByteSourceInputStream;
import org.apache.commons.imaging.formats.tiff.TiffContents;
import org.apache.commons.imaging.formats.tiff.TiffDirectory;
import org.apache.commons.imaging.formats.tiff.TiffField;
import org.apache.commons.imaging.formats.tiff.TiffReader;
import org.apache.commons.imaging.formats.tiff.constants.GeoTiffTagConstants;
import org.apache.commons.imaging.formats.tiff.constants.TiffTagConstants;
import org.apache.commons.math3.util.FastMath;
import org.orekit.rugged.api.RuggedException;
import org.orekit.rugged.api.TileUpdater;
import org.orekit.rugged.api.UpdatableTile;
/** Digital Elevation Model Updater using Aster data.
* @author Luc Maisonobe
*/
public class AsterTileUpdater implements TileUpdater {
/** Directory for Aster data. */
private final File directory;
/** Simple constructor.
* @param directory directory holding Aster data.
*/
public AsterTileUpdater(final File directory) {
this.directory = directory;
}
/** {@inheritDoc} */
@Override
public void updateTile(final double latitude, final double longitude,
final UpdatableTile tile)
throws RuggedException {
final String name = fileName(latitude, longitude);
try {
// build the file name
final File file = new File(directory, name);
if (!file.exists()) {
throw new RuggedException(AsterMessages.NO_DEM_DATA_FOR_POINT,
FastMath.toDegrees(latitude), FastMath.toDegrees(longitude));
}
final ZipFile zipFile = new ZipFile(file);
for (final Enumeration<? extends ZipEntry> e = zipFile.entries(); e.hasMoreElements();) {
final ZipEntry entry = e.nextElement();
if ((!entry.isDirectory()) && entry.getName().endsWith("_dem.tif")) {
load(zipFile.getInputStream(entry), file.getAbsolutePath(), tile);
}
}
zipFile.close();
} catch (IOException ioe) {
final RuggedException re =
new RuggedException(AsterMessages.ERROR_PARSING_FILE, name, ioe.getLocalizedMessage());
re.initCause(ioe);
throw re;
}
}
/** Build the file name covering a point.
* @param latitude point latitude
* @param longitude point longitude
* @return file name
*/
private String fileName(final double latitude, final double longitude) {
final int latCode = (int) FastMath.floor(FastMath.toDegrees(latitude));
final int lonCode = (int) FastMath.floor(FastMath.toDegrees(longitude));
if (latCode < 0) {
if (lonCode < 0) {
return String.format("ASTGTM2_S%2dW%3d.zip", -latCode, -lonCode);
} else {
return String.format("ASTGTM2_S%2dE%3d.zip", -latCode, lonCode);
}
} else {
if (lonCode < 0) {
return String.format("ASTGTM2_N%2dW%3d.zip", latCode, -lonCode);
} else {
return String.format("ASTGTM2_N%2dE%3d.zip", latCode, lonCode);
}
}
}
/** Load a Digital Elevation Model.
* @param stream stream containing the Digital Elevation Model
* @param fileName name of the file
* @param tile tile to update
* @exception IOException if file cannot be loaded
* @exception RuggedException if ASTER data cannot be extracted
*/
private void load(final InputStream stream, final String fileName, final UpdatableTile tile)
throws RuggedException, IOException {
try {
// read TIFF
final TiffReader reader = new TiffReader(true);
final ByteSource source = new ByteSourceInputStream(stream, fileName);
final TiffContents contents = reader.readContents(source, null, FormatCompliance.getDefault());
// extract GeoTiff data
final TiffField scalesField = contents.findField(GeoTiffTagConstants.EXIF_TAG_MODEL_PIXEL_SCALE_TAG);
if (scalesField == null) {
throw new RuggedException(AsterMessages.MISSING_PIXEL_SCALE, fileName);
}
final double[] pixelsScales = scalesField.getDoubleArrayValue();
final TiffField tieField = contents.findField(GeoTiffTagConstants.EXIF_TAG_MODEL_TIEPOINT_TAG);
if (tieField == null) {
throw new RuggedException(AsterMessages.MISSING_TIE_POINT, fileName);
}
final double[] tiePoint = tieField.getDoubleArrayValue();
final int latitudeRows = contents.findField(TiffTagConstants.TIFF_TAG_IMAGE_LENGTH).getIntValue();
final int longitudeColumns = contents.findField(TiffTagConstants.TIFF_TAG_IMAGE_WIDTH).getIntValue();
final int[] geoKeyDirectory = contents.findField(GeoTiffTagConstants.EXIF_TAG_GEO_KEY_DIRECTORY_TAG).getIntArrayValue();
final int keyDirectoryVersion = geoKeyDirectory[0];
final int keyRevision = geoKeyDirectory[1];
final int minorRevision = geoKeyDirectory[2];
final int numberOfKeys = geoKeyDirectory[3];
if (keyDirectoryVersion != 1 || keyRevision != 1 || minorRevision != 0) {
throw new RuggedException(AsterMessages.UNSUPPORTED_GEOTIFF_VERSION,
keyDirectoryVersion, keyRevision, minorRevision, fileName,
1, 1, 0);
}
AngulerUnits angulerUnits = AngulerUnits.DEGREE;
for (int i = 0; i < numberOfKeys; ++i) {
final GeoKey geoKey = GeoKey.getKey(geoKeyDirectory[4 * i + 4]);
final int location = geoKeyDirectory[4 * i + 5];
final int count = geoKeyDirectory[4 * i + 6];
final int valueOffset = geoKeyDirectory[4 * i + 7];
switch(geoKey) {
case GT_MODEL_TYPE: {
final ModelType modelType = ModelType.getType(getShort(geoKey, location, count, valueOffset, fileName));
if (modelType != ModelType.GEOGRAPHIC) {
throw new RuggedException(AsterMessages.UNEXPECTED_GEOKEY_VALUE,
geoKey, fileName, modelType, ModelType.GEOCENTRIC);
}
break;
}
case GT_RASTER_TYPE: {
final RasterType rasterType = RasterType.getType(getShort(geoKey, location, count, valueOffset, fileName));
if (rasterType != RasterType.RASTER_PIXEL_IS_AREA) {
throw new RuggedException(AsterMessages.UNEXPECTED_GEOKEY_VALUE,
geoKey, fileName, rasterType, RasterType.RASTER_PIXEL_IS_AREA);
}
break;
}
case GEOGRAPHIC_TYPE: {
final GeographicCoordinateSystemType csType =
GeographicCoordinateSystemType.getType(getShort(geoKey, location, count, valueOffset, fileName));
if (csType != GeographicCoordinateSystemType.GCS_WGS_84) {
throw new RuggedException(AsterMessages.UNEXPECTED_GEOKEY_VALUE,
geoKey, fileName, csType, GeographicCoordinateSystemType.GCS_WGS_84);
}
break;
}
case GEOG_LINEAR_UNITS: {
final LinearUnits linearUnits =
LinearUnits.getUnits(getShort(geoKey, location, count, valueOffset, fileName));
if (linearUnits != LinearUnits.METER) {
throw new RuggedException(AsterMessages.UNEXPECTED_GEOKEY_VALUE,
geoKey, fileName, linearUnits, LinearUnits.METER);
}
break;
}
case GEOG_ANGULAR_UNITS: {
angulerUnits = AngulerUnits.getUnits(getShort(geoKey, location, count, valueOffset, fileName));
break;
}
default:
throw new RuggedException(AsterMessages.UNEXPECTED_GEOKEY, geoKey, fileName);
}
}
// set up geometry
final double latitudeStep = angulerUnits.toRadians(pixelsScales[1]);
final double longitudeStep = angulerUnits.toRadians(pixelsScales[0]);
final double minLatitude = angulerUnits.toRadians(tiePoint[4]) - (latitudeRows - 1) * latitudeStep;
final double minLongitude = angulerUnits.toRadians(tiePoint[3]);
tile.setGeometry(minLatitude, minLongitude, latitudeStep, longitudeStep,
latitudeRows, longitudeColumns);
// read the raster data
final int msb = reader.getByteOrder() == ByteOrder.BIG_ENDIAN ? 0 : 1;
final int lsb = reader.getByteOrder() == ByteOrder.BIG_ENDIAN ? 1 : 0;
int i = 0;
for (final TiffDirectory tiffDirectory : contents.directories) {
for (final TiffDirectory.ImageDataElement element : tiffDirectory.getTiffRawImageDataElements()) {
final byte[] bytes = source.getBlock(element.offset, element.length);
for (int longitudeIndex = 0; longitudeIndex < longitudeColumns; ++longitudeIndex) {
final int elevation = (bytes[2 * longitudeIndex + msb] << 8) |
bytes[2 * longitudeIndex + 1 + lsb];
tile.setElevation(latitudeRows - 1 - i, longitudeIndex, elevation);
}
i++;
}
}
} catch (ImageReadException ire) {
throw new RuggedException(AsterMessages.ERROR_PARSING_FILE,
fileName, ire.getLocalizedMessage());
}
}
/** Get a short from the geo key directory.
* @param key being parsed
* @param location location of the short
* @param count number of elements
* @param valueOffset offset of the value
* @param fileName name of the file
* @return short value
* @exception RuggedException if value cannot be retrieved
*/
private int getShort(final GeoKey key, final int location, final int count, final int valueOffset,
final String fileName)
throws RuggedException {
if (location != 0 && count != 1) {
throw new RuggedException(AsterMessages.UNABLE_TO_RETRIEVE_VALUE_FOR_KEY, key, fileName);
}
return valueOffset;
}
}
/* Copyright 2013-2014 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
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 {
// CHECKSTYLE: stop JavadocVariable check
GT_MODEL_TYPE(1024),
GT_RASTER_TYPE(1025),
GT_CITATION(1026),
GEOGRAPHIC_TYPE(2048),
GEOG_CITATION(2049),
GEOG_GEODETICDATUM(2050),
GEOG_PRIME_MERIDIAN(2051),
GEOG_PRIME_MERIDIAN_LONG(2061),
GEOG_LINEAR_UNITS(2052),
GEOG_LINEAR_UNIT_SIZE(2053),
GEOG_ANGULAR_UNITS(2054),
GEOG_ANGULAR_UNIT_SIZE(2055),
GEOG_ELLIPSOID(2056),
GEOG_SEMI_MAJOR_AXIS(2057),
GEOG_SEMI_MINOR_AXIS(2058),
GEOG_INV_FLATTENING(2059),
GEOG_AZIMUTH_UNITS(2060),
PROJECTED_CS_TYPE(3072),
PCS_CITATION(3073),
PROJECTION(3074),
PROJ_COORD_TRANS(3075),
PROJ_LINEAR_UNITS(3076),
PROJ_LINEAR_UNIT_SIZE(3077),
PROJ_STD_PARALLEL_1(3078),
PROJ_STD_PARALLEL_2(3079),
PROJ_NAT_ORIGIN_LONG(3080),
PROJ_NAT_ORIGIN_LAT(3081),
PROJ_FALSE_EASTING(3082),
PROJ_FALSE_NORTHING(3083),
PROJ_FALSE_ORIGIN_LONG(3084),
PROJ_FALSE_ORIGIN_LAT(3085),
PROJ_FALSE_ORIGIN_EASTING(3086),
PROJ_FALSE_ORIGIN_NORTHING(3087),
PROJ_CENTER_LONG(3088),
PROJ_CENTER_LAT(3089),
PROJ_CENTER_EASTING(3090),
PROJ_FALSE_ORIGIN_NORTHING_ALTERNATE(3091),
PROJ_SCALE_AT_NAT_ORIGIN(3092),
PROJ_SCALE_AT_CENTER(3093),
PROJ_AZIMUTH_ANGLE(3094),
PROJ_STRAIGHT_VERT_POLE_LONG(3095),
VERTICAL_CS_TYPE(4096),
VERTICAL_CITATION(4097),
VERTICAL_DATUM(4098),
VERTICAL_UNITS(4099);
// CHECKSTYLE: resume JavadocVariable check
/** Key ID. */
private final int id;
/** Simple constructor.
* @param id key id
*/
private GeoKey(final int id) {
this.id = id;
}
/** Get the key corresponding to an id.
* @param id key id
* @return the key corresponding to the id
* @exception IllegalArgumentException if the id does not correspond to a known key
*/
public static GeoKey getKey(final int id) {
for (GeoKey key : values()) {
if (key.id == id) {
return key;
}
}
throw new IllegalArgumentException();
}
}
/* Copyright 2013-2014 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
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 {
// CHECKSTYLE: stop JavadocVariable check
GCS_UNDEFINED(0),
GCS_ADINDAN(4201),
GCS_AGD66(4202),
GCS_AGD84(4203),
GCS_AIN_EL_ABD(4204),
GCS_AFGOOYE(4205),
GCS_AGADEZ(4206),
GCS_LISBON(4207),
GCS_ARATU(4208),
GCS_ARC_1950(4209),
GCS_ARC_1960(4210),
GCS_BATAVIA(4211),
GCS_BARBADOS(4212),
GCS_BEDUARAM(4213),
GCS_BEIJING_1954(4214),
GCS_BELGE_1950(4215),
GCS_BERMUDA_1957(4216),
GCS_BERN_1898(4217),
GCS_BOGOTA(4218),
GCS_BUKIT_RIMPAH(4219),
GCS_CAMACUPA(4220),
GCS_CAMPO_INCHAUSPE(4221),
GCS_CAPE(4222),
GCS_CARTHAGE(4223),
GCS_CHUA(4224),
GCS_CORREGO_ALEGRE(4225),
GCS_COTE_D_IVOIRE(4226),
GCS_DEIR_EZ_ZOR(4227),
GCS_DOUALA(4228),
GCS_EGYPT_1907(4229),
GCS_ED50(4230),
GCS_ED87(4231),
GCS_FAHUD(4232),
GCS_GANDAJIKA_1970(4233),
GCS_GAROUA(4234),
GCS_GUYANE_FRANCAISE(4235),
GCS_HU_TZU_SHAN(4236),
GCS_HD72(4237),
GCS_ID74(4238),
GCS_INDIAN_1954(4239),
GCS_INDIAN_1975(4240),
GCS_JAMAICA_1875(4241),
GCS_JAD69(4242),
GCS_KALIANPUR(4243),
GCS_KANDAWALA(4244),
GCS_KERTAU(4245),
GCS_KOC(4246),
GCS_LA_CANOA(4247),
GCS_PSAD56(4248),
GCS_LAKE(4249),
GCS_LEIGON(4250),
GCS_LIBERIA_1964(4251),
GCS_LOME(4252),
GCS_LUZON_1911(4253),
GCS_HITO_XVIII_1963(4254),
GCS_HERAT_NORTH(4255),
GCS_MAHE_1971(4256),
GCS_MAKASSAR(4257),
GCS_EUREF89(4258),
GCS_MALONGO_1987(4259),
GCS_MANOCA(4260),
GCS_MERCHICH(4261),
GCS_MASSAWA(4262),
GCS_MINNA(4263),
GCS_MHAST(4264),
GCS_MONTE_MARIO(4265),
GCS_M_PORALOKO(4266),
GCS_NAD27(4267),
GCS_NAD_MICHIGAN(4268),
GCS_NAD83(4269),
GCS_NAHRWAN_1967(4270),
GCS_NAPARIMA_1972(4271),
GCS_GD49(4272),
GCS_NGO_1948(4273),
GCS_DATUM_73(4274),
GCS_NTF(4275),
GCS_NSWC_9Z_2(4276),
GCS_OSGB_1936(4277),
GCS_OSGB70(4278),
GCS_OS_SN80(4279),
GCS_PADANG(4280),
GCS_PALESTINE_1923(4281),
GCS_POINTE_NOIRE(4282),
GCS_GDA94(4283),
GCS_PULKOVO_1942(4284),
GCS_QATAR(4285),
GCS_QATAR_1948(4286),
GCS_QORNOQ(4287),
GCS_LOMA_QUINTANA(4288),
GCS_AMERSFOORT(4289),
GCS_RT38(4290),
GCS_SAD69(4291),
GCS_SAPPER_HILL_1943(4292),
GCS_SCHWARZECK(4293),
GCS_SEGORA(4294),
GCS_SERINDUNG(4295),
GCS_SUDAN(4296),
GCS_TANANARIVE(4297),
GCS_TIMBALAI_1948(4298),
GCS_TM65(4299),
GCS_TM75(4300),
GCS_TOKYO(4301),
GCS_TRINIDAD_1903(4302),
GCS_TC_1948(4303),
GCS_VOIROL_1875(4304),
GCS_VOIROL_UNIFIE(4305),
GCS_BERN_1938(4306),
GCS_NORD_SAHARA_1959(4307),
GCS_STOCKHOLM_1938(4308),
GCS_YACARE(4309),
GCS_YOFF(4310),
GCS_ZANDERIJ(4311),
GCS_MGI(4312),
GCS_BELGE_1972(4313),
GCS_DHDN(4314),
GCS_CONAKRY_1905(4315),
GCS_WGS_72(4322),
GCS_WGS_72BE(4324),
GCS_WGS_84(4326),
GCS_BERN_1898_BERN(4801),
GCS_BOGOTA_BOGOTA(4802),
GCS_LISBON_LISBON(4803),
GCS_MAKASSAR_JAKARTA(4804),
GCS_MGI_FERRO(4805),
GCS_MONTE_MARIO_ROME(4806),
GCS_NTF_PARIS(4807),
GCS_PADANG_JAKARTA(4808),
GCS_BELGE_1950_BRUSSELS(4809),
GCS_TANANARIVE_PARIS(4810),
GCS_VOIROL_1875_PARIS(4811),
GCS_VOIROL_UNIFIE_PARIS(4812),
GCS_BATAVIA_JAKARTA(4813),
GCS_ATF_PARIS(4901),
GCS_NDG_PARIS(4902),
GCSE_AIRY1830(4001),
GCSE_AIRYMODIFIED1849(4002),
GCSE_AUSTRALIANNATIONALSPHEROID(4003),
GCSE_BESSEL1841(4004),
GCSE_BESSELMODIFIED(4005),
GCSE_BESSELNAMIBIA(4006),
GCSE_CLARKE1858(4007),
GCSE_CLARKE1866(4008),
GCSE_CLARKE1866MICHIGAN(4009),
GCSE_CLARKE1880_BENOIT(4010),
GCSE_CLARKE1880_IGN(4011),
GCSE_CLARKE1880_RGS(4012),
GCSE_CLARKE1880_ARC(4013),
GCSE_CLARKE1880_SGA1922(4014),
GCSE_EVEREST1830_1937ADJUSTMENT(4015),
GCSE_EVEREST1830_1967DEFINITION(4016),
GCSE_EVEREST1830_1975DEFINITION(4017),
GCSE_EVEREST1830MODIFIED(4018),
GCSE_GRS1980(4019),
GCSE_HELMERT1906(4020),
GCSE_INDONESIANNATIONALSPHEROID(4021),
GCSE_INTERNATIONAL1924(4022),
GCSE_INTERNATIONAL1967(4023),
GCSE_KRASSOWSKY1940(4024),
GCSE_NWL9D(4025),
GCSE_NWL10D(4026),
GCSE_PLESSIS1817(4027),
GCSE_STRUVE1860(4028),
GCSE_WAROFFICE(4029),
GCSE_WGS84(4030),
GCSE_GEM10C(4031),
GCSE_OSU86F(4032),
GCSE_OSU91A(4033),
GCSE_CLARKE1880(4034),
GCSE_SPHERE(4035);
// CHECKSTYLE: resume JavadocVariable check
/** Type ID. */
private final int id;
/** Simple constructor.
* @param id key id
*/
private GeographicCoordinateSystemType(final int id) {
this.id = id;
}
/** Get the type corresponding to an id.
* @param id type id
* @return the type corresponding to the id
* @exception IllegalArgumentException if the id does not correspond to a known type
*/
public static GeographicCoordinateSystemType getType(final int id) {
for (GeographicCoordinateSystemType type : values()) {
if (type.id == id) {
return type;
}
}
throw new IllegalArgumentException();
}
}