This repository has been archived by the owner on Sep 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from jpatton-USGS/tt-files
Travel time package rewrite
- Loading branch information
Showing
68 changed files
with
8,056 additions
and
5,275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# version.cmake - a CMake script that defines the overall project version | ||
set (PROJECT_VERSION_MAJOR 1) | ||
set (PROJECT_VERSION_MINOR 2) | ||
set (PROJECT_VERSION_PATCH 1) | ||
set (PROJECT_VERSION_MINOR 3) | ||
set (PROJECT_VERSION_PATCH 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
||
# Ignore Gradle build output directory | ||
build/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
# gen-traveltimes-app | ||
# gen-travel-times-app | ||
|
||
**Gen-travel-times-app** is an application that uses the glasscore traveltime | ||
libraries to generate the traveltime lookup files (.trv) used by neic-glass3 from a | ||
model file. Please note that this application is currently not optimized, and | ||
is **extremely** slow. | ||
A java program used to generate glass3 traveltimes from the NEIC java [travel time](https://github.com/usgs/neic-traveltime) package. | ||
|
||
## Building | ||
Dependencies | ||
------ | ||
* gen-travel-times-app was written in Oracle Java 1.8 | ||
* gen-travel-times-app is built with [Gradle](https://gradle.org/), a build.gradle file and gradlew are included in this project | ||
* gen-travel-times-app depends on the [neic-traveltime](https://github.com/usgs/neic-traveltime) package. A copy of this package is included with this package. | ||
|
||
To build **gen-travel-times-app**, set the `BUILD_GEN-TRAVELTMES-APP` option equal | ||
to true (1) in the CMake command or GUI. | ||
Building | ||
------ | ||
The steps to get and build gen-travel-times-app.jar using gradle are as follows: | ||
|
||
## Configuration | ||
1. Clone neic-glass3. | ||
2. Open a command window and change directories to /neic-glass3/gen-travel-times-app/ | ||
3. To build the jar file, run the command `./gradlew build` | ||
|
||
An example configuration for **gen-travel-times-app** is available in the [gen-travel-times-app params directory](https://github.com/usgs/neic-glass3/tree/master/gen-travel-times-app/params) | ||
Using | ||
----- | ||
Once you are able to build the gen-travel-times-app jar, simply include the jar | ||
file in your application, or call using the App class. | ||
|
||
## Running | ||
A set of model files used by the gen-travel-times-app is stored in the models/ directory. | ||
|
||
To run **gen-travel-times-app**, use the following command: `gen-travel-times-app <configfile> [logname]` where `<configfile>` is the required path the the gen-travel-times.d configuration file and `[logname]` is an optional command that when present specifies the log file name and enables logging. | ||
Example configuration files are included in `/neic-glass3/gen-travel-times-app/src/main/resources/` | ||
|
||
For more information, please see the [gen-travel-times-app DOxygen documentation](https://usgs.github.io/neic-glass3/html/gen-travel-times-app_8cpp.html) | ||
To run this example, run from `/neic-glass3/gen-travel-times-app/` run the command: `java -jar build/libs/gen-travel-times-app-0.1.0.jar --configFile=src/main/resources/config.json` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* This file was generated by the Gradle 'init' task. | ||
* | ||
* This generated file contains a sample Java project to get you started. | ||
* For more details take a look at the Java Quickstart chapter in the Gradle | ||
* User Manual available at https://docs.gradle.org/5.4.1/userguide/tutorial_java_projects.html | ||
*/ | ||
|
||
plugins { | ||
// Apply the java plugin to add support for Java | ||
id 'java' | ||
|
||
// Apply the application plugin to add support for building an application | ||
id 'application' | ||
|
||
// google java format | ||
id 'com.github.sherter.google-java-format' version '0.8' | ||
} | ||
|
||
sourceCompatibility = '1.10' | ||
targetCompatibility = '1.10' | ||
version = '0.1.0' | ||
|
||
repositories { | ||
// Use jcenter for resolving your dependencies. | ||
// You can declare any Maven/Ivy/file repository here. | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
// This dependency is found on compile classpath of this component and consumers. | ||
implementation 'com.google.guava:guava:27.0.1-jre' | ||
|
||
// com.googlecode.json.simple | ||
compile "com.googlecode.json-simple:json-simple:1.1.1" | ||
|
||
// Use JUnit test framework | ||
testImplementation 'junit:junit:4.12' | ||
|
||
// neic traveltimes | ||
compile files('lib/neic-traveltime-0.1.0.jar') | ||
|
||
// https://mvnrepository.com/artifact/log4j/log4j | ||
compile group: 'log4j', name: 'log4j', version: '1.2.17' | ||
} | ||
|
||
// always format to google style prior to the build | ||
//compileJava.dependsOn 'googleJavaFormat' | ||
|
||
// Google java style is checked automatically as part of the check task | ||
// Note: To reformat all java code (not in lib) into the | ||
// google java style, run ./gradlew goJF | ||
project.tasks.check.dependsOn(verifyGoogleJavaFormat) | ||
|
||
// set jar entry point | ||
jar { | ||
manifest { | ||
attributes( | ||
'Class-Path': configurations.compile.collect { it.getName() }.join(' '), | ||
'Main-Class': 'gov.usgs.GenTravelTimes.App' | ||
) | ||
} | ||
from { | ||
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } | ||
} | ||
} | ||
|
||
// Define the main class for the application | ||
mainClassName = 'gov.usgs.GenTravelTimes.App' | ||
|
||
// show compile warnings | ||
tasks.withType(JavaCompile) { | ||
options.setDeprecation(true); | ||
options.setWarnings(true); | ||
} | ||
|
Oops, something went wrong.