Javadoc for GRIB stuff

Change-Id: I3dd24e599f8475b61413e39c3a9fbc1acc2eccc2
This commit is contained in:
Axel Uhl
2017-02-02 22:27:20 +01:00
parent 3bf98bebc6
commit b827ea75bc
2 changed files with 24 additions and 0 deletions
@@ -8,6 +8,12 @@ import com.sap.sailing.domain.tracking.WindWithConfidence;
import com.sap.sse.common.TimePoint;
import com.sap.sse.common.TimeRange;
/**
* A wind field that is based on some GRIB data and can be queried using a {@link TimePoint} and a {@link Position}.
*
* @author Axel Uhl (D043530)
*
*/
public interface GribWindField {
/**
* @return the geographical bounds within which there is wind data in this field
@@ -29,5 +35,8 @@ public interface GribWindField {
*/
WindWithConfidence<TimePoint> getWind(TimePoint timePoint, Position position) throws IOException;
/**
* The time range covered by the underlying GRIB data.
*/
TimeRange getTimeRange();
}
@@ -4,6 +4,21 @@ import com.sap.sailing.grib.impl.GribWindFieldFactoryImpl;
import ucar.nc2.ft.FeatureDataset;
/**
* Factory interface used to create objects of type {@link GribWindField} based on a {@link FeatureDataset}.
*
* Example Usage:
* <pre>
* final Formatter errorLog = new Formatter(System.err);
* final ucar.nc2.util.CancelTask task = null;
* final String location = "resources/globalMarineNetCroatia.grb.bz2"; // or could be some URI / URL from where to retrieve it
* final FeatureDataset dataSet = FeatureDatasetFactoryManager.open(FeatureType.ANY, location, task, errorLog);
* final GribWindField windField = GribWindFieldFactory.INSTANCE.createGribWindField(dataSet);
* </pre>
*
* @author Axel Uhl (D043530)
*
*/
public interface GribWindFieldFactory {
GribWindFieldFactory INSTANCE = new GribWindFieldFactoryImpl();