congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SubTileDataView
Code IndexAdd Tabnine to your IDE (free)

How to use
SubTileDataView
in
com.oculusinfo.binning.impl

Best Java code snippets using com.oculusinfo.binning.impl.SubTileDataView (Showing top 10 results out of 315)

origin: unchartedsoftware/aperture-tiles

@Test(expected = IllegalArgumentException.class)
public void testOutOfBoundsYBin () {
  SubTileDataView<Integer> underTest = SubTileDataView.fromSourceAbsolute(source16, new TileIndex(1, 1, 1));
  underTest.getBin(1,2);
}
origin: unchartedsoftware/aperture-tiles

@Override
public T getBin (int x, int y) {
  if (x < 0 || x >= getDefinition().getXBins()) {
    throw new IllegalArgumentException("Bin x index is outside of tile's valid bin range");
  }
  if (y < 0 || y >= getDefinition().getYBins()) {
    throw new IllegalArgumentException("Bin y index is outside of tile's valid bin range");
  }
  return _source.getBin(x + _xOffset, y + _yOffset);
}
origin: unchartedsoftware/aperture-tiles

@Test
public void testSimple () {
  SubTileDataView<Integer> underTest = SubTileDataView.fromSourceAbsolute(source16, new TileIndex(1, 1, 1));
  Assert.assertEquals(1, underTest.getDefinition().getLevel());
  Assert.assertEquals(1, underTest.getDefinition().getX());
  Assert.assertEquals(1, underTest.getDefinition().getY());
  Assert.assertEquals(2, underTest.getDefinition().getXBins());
  Assert.assertEquals(2, underTest.getDefinition().getYBins());
  Assert.assertEquals(2, (int)underTest.getBin(0,0));
  Assert.assertEquals(7, (int)underTest.getBin(1,1));
}
origin: unchartedsoftware/aperture-tiles

  data = SubTileDataView.fromSourceAbsolute(tileDatas.get(0), index);
} else {
origin: unchartedsoftware/aperture-tiles

return new SubTileDataView<>(source,
    new TileIndex(targetIndex.getLevel(), targetIndex.getX(), targetIndex.getY(), sourceIndex.getXBins()/tileCountRatio, sourceIndex.getYBins()/tileCountRatio),
    xBinStart, yBinStart);
origin: unchartedsoftware/aperture-tiles

@Test
public void testSimpleTwoLevels () {
  SubTileDataView<Integer> underTest = SubTileDataView.fromSourceAbsolute(source16, new TileIndex(2, 1, 1));
  Assert.assertEquals(2, underTest.getDefinition().getLevel());
  Assert.assertEquals(1, underTest.getDefinition().getX());
  Assert.assertEquals(1, underTest.getDefinition().getY());
  Assert.assertEquals(1, underTest.getDefinition().getXBins());
  Assert.assertEquals(1, underTest.getDefinition().getYBins());
  Assert.assertEquals(9, (int)underTest.getBin(0,0));
}
origin: unchartedsoftware/aperture-tiles

@Test(expected = IllegalArgumentException.class)
public void testBadRelativeIndex () {
  TileData<Integer> source = new DenseTileData<>(new TileIndex(1, 0, 0));
  SubTileDataView.fromSourceAbsolute(source, new TileIndex(2, 2, 1));
}
origin: unchartedsoftware/aperture-tiles

@Test(expected = IllegalArgumentException.class)
public void testOutOfBoundsXBin () {
  SubTileDataView<Integer> underTest = SubTileDataView.fromSourceAbsolute(source16, new TileIndex(1, 1, 1));
  underTest.getBin(2,1);
}
origin: unchartedsoftware/aperture-tiles

@Test(expected = IllegalArgumentException.class)
public void testBadRelativeLevel() {
  TileData<Integer> source = new DenseTileData<>(new TileIndex(3, 0, 0));
  SubTileDataView.fromSourceAbsolute(source, new TileIndex(2, 1, 1));
}
origin: unchartedsoftware/aperture-tiles

@Override
public void setBin(int x, int y, T value) {
  if (x < 0 || x >= getDefinition().getXBins()) {
    throw new IllegalArgumentException("Bin x index is outside of tile's valid bin range");
  }
  if (y < 0 || y >= getDefinition().getYBins()) {
    throw new IllegalArgumentException("Bin y index is outside of tile's valid bin range");
  }
  _source.setBin(x + _xOffset, y + _yOffset, value);
}
com.oculusinfo.binning.implSubTileDataView

Javadoc

A TileData instance that wraps and provides a subset view of the data of another TileData. Effectively this allows sourcing a higher level tile's data contained within a parent tile using the parent's data at a lower resolution.

Most used methods

  • fromSourceAbsolute
    Factory method that creates a SubTileDataView given a source tile and a target tile index which must
  • getDefinition
  • <init>
  • getBin

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Menu (java.awt)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now