Class AbstractBuiltinDataset
java.lang.Object
net.buildtheearth.terraminusminus.dataset.builtin.AbstractBuiltinDataset
- All Implemented Interfaces:
IScalarDataset
Abstract implementation of
IScalarDataset for the builtin datasets.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract doubleget(double x, double y) getAsync(double lon, double lat) Asynchronously gets a single value at the given point.CompletableFuture<double[]> getAsync(@NonNull CornerBoundingBox2d bounds, int sizeX, int sizeZ) Asynchronously gets a bunch of values at the given coordinates.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.buildtheearth.terraminusminus.dataset.IScalarDataset
getAsync
-
Field Details
-
scaleX
protected final double scaleX -
scaleY
protected final double scaleY
-
-
Constructor Details
-
AbstractBuiltinDataset
public AbstractBuiltinDataset(int samplesX, int samplesY)
-
-
Method Details
-
getAsync
public CompletableFuture<Double> getAsync(double lon, double lat) throws OutOfProjectionBoundsException Description copied from interface:IScalarDatasetAsynchronously gets a single value at the given point.- Specified by:
getAsyncin interfaceIScalarDataset- Parameters:
lon- the longitudelat- the latitude- Returns:
- a
CompletableFuturewhich will be completed with the value - Throws:
OutOfProjectionBoundsException
-
getAsync
public CompletableFuture<double[]> getAsync(@NonNull @NonNull CornerBoundingBox2d bounds, int sizeX, int sizeZ) throws OutOfProjectionBoundsException Description copied from interface:IScalarDatasetAsynchronously gets a bunch of values at the given coordinates.- Specified by:
getAsyncin interfaceIScalarDataset- Parameters:
sizeX- the number of samples to take along the X axissizeZ- the number of samples to take along the Z axis- Returns:
- a
CompletableFuturewhich will be completed with the values - Throws:
OutOfProjectionBoundsException
-
get
protected abstract double get(double x, double y)
-