Class DoubleTiledDataset
java.lang.Object
com.google.common.cache.CacheLoader<ChunkPos,CompletableFuture<double[]>>
net.buildtheearth.terraminusminus.dataset.Dataset<ChunkPos,double[]>
net.buildtheearth.terraminusminus.dataset.TiledDataset<double[]>
net.buildtheearth.terraminusminus.dataset.TiledHttpDataset<double[]>
net.buildtheearth.terraminusminus.dataset.scalar.DoubleTiledDataset
- All Implemented Interfaces:
IDataset<ChunkPos,,double[]> IScalarDataset
- Direct Known Subclasses:
ConfigurableDoubleTiledDataset
public abstract class DoubleTiledDataset
extends TiledHttpDataset<double[]>
implements IScalarDataset
A
TiledDataset which operates on a grid of interpolated doubles.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.google.common.cache.CacheLoader
com.google.common.cache.CacheLoader.InvalidCacheLoadException, com.google.common.cache.CacheLoader.UnsupportedLoadingOperationException -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BlendModeprotected final intprotected final intprotected final intFields inherited from class net.buildtheearth.terraminusminus.dataset.TiledDataset
projection, tileSize -
Constructor Summary
ConstructorsConstructorDescriptionDoubleTiledDataset(@NonNull GeographicProjection projection, int resolution, @NonNull BlendMode blend) -
Method Summary
Modifier and TypeMethodDescriptionblend()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.intmask()intintshift()Methods inherited from class net.buildtheearth.terraminusminus.dataset.TiledHttpDataset
addProperties, decode, load, urlsMethods inherited from class net.buildtheearth.terraminusminus.dataset.TiledDataset
projection, tileSizeMethods inherited from class com.google.common.cache.CacheLoader
asyncReloading, from, from, loadAll, reloadMethods 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
-
blend
-
resolution
protected final int resolution -
shift
protected final int shift -
mask
protected final int mask
-
-
Constructor Details
-
DoubleTiledDataset
public DoubleTiledDataset(@NonNull @NonNull GeographicProjection projection, int resolution, @NonNull @NonNull BlendMode blend)
-
-
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
-
blend
-
resolution
public int resolution() -
shift
public int shift() -
mask
public int mask()
-